HttpProtocolVersion

data class HttpProtocolVersion

Represents an HTTP protocol version.

Constructors

<init>

HttpProtocolVersion(name: String, major: Int, minor: Int)

Represents an HTTP protocol version.

Properties

major

val major: Int

specifies protocol major version.

minor

val minor: Int

specifies protocol minor version.

name

val name: String

specifies name of the protocol, e.g. “HTTP”.

Functions

toString

fun toString(): String

Companion Object Properties

HTTP_1_0

val HTTP_1_0: HttpProtocolVersion

HTTP/1.0 version.

HTTP_1_1

val HTTP_1_1: HttpProtocolVersion

HTTP/1.1 version.

HTTP_2_0

val HTTP_2_0: HttpProtocolVersion

HTTP/2.0 version.

QUIC

QUIC/1.0 version.

SPDY_3

SPDY/3.0 version.

Companion Object Functions

fromValue

fun fromValue(
    name: String,
    major: Int,
    minor: Int
): HttpProtocolVersion

Creates an instance of HttpProtocolVersion from the given parameters.

parse

fun parse(value: CharSequence): HttpProtocolVersion

Create an instance of HttpProtocolVersion from http string representation.