Android APIs
public final class

HttpVersion

extends ProtocolVersion
implements Serializable
java.lang.Object
   ↳ org.apache.http.ProtocolVersion
     ↳ org.apache.http.HttpVersion

This class was deprecated in API level 22.
Please use openConnection() instead. Please visit this webpage for further details.

Class Overview

Represents an HTTP version, as specified in RFC 2616.

Summary

Constants
String HTTP The protocol name.
Fields
public static final HttpVersion HTTP_0_9 HTTP protocol version 0.9
public static final HttpVersion HTTP_1_0 HTTP protocol version 1.0
public static final HttpVersion HTTP_1_1 HTTP protocol version 1.1
[Expand]
Inherited Fields
From class org.apache.http.ProtocolVersion
Public Constructors
HttpVersion(int major, int minor)
Create an HTTP protocol version designator.
Public Methods
ProtocolVersion forVersion(int major, int minor)
Obtains a specific HTTP version.
[Expand]
Inherited Methods
From class org.apache.http.ProtocolVersion
From class java.lang.Object

Constants

public static final String HTTP

Added in API level 1

The protocol name.

Constant Value: "HTTP"

Fields

public static final HttpVersion HTTP_0_9

Added in API level 1

HTTP protocol version 0.9

public static final HttpVersion HTTP_1_0

Added in API level 1

HTTP protocol version 1.0

public static final HttpVersion HTTP_1_1

Added in API level 1

HTTP protocol version 1.1

Public Constructors

public HttpVersion (int major, int minor)

Added in API level 1

Create an HTTP protocol version designator.

Parameters
major the major version number of the HTTP protocol
minor the minor version number of the HTTP protocol
Throws
IllegalArgumentException if either major or minor version number is negative

Public Methods

public ProtocolVersion forVersion (int major, int minor)

Added in API level 1

Obtains a specific HTTP version.

Parameters
major the major version
minor the minor version
Returns