HttpMessage

interface HttpMessage

A message either from the client or the server, that has headers associated.

Properties

headers

abstract val headers: Headers

Message Headers

Extension Functions

cacheControl

fun HttpMessage.cacheControl(): List<HeaderValue>

Parse CacheControl header.

charset

fun HttpMessage.charset(): Charset?

Parse charset from Content-Type header value.

contentLength

fun HttpMessage.contentLength(): Long?

Parse Content-Length header value.

contentType

fun HttpMessage.contentType(): ContentType?

Parse Content-Type header value.

date

fun HttpMessage.date(): Date?

Parse Date header.

etag

fun HttpMessage.etag(): String?

Parse E-Tag header value.

expires

fun HttpMessage.expires(): Date?

Parse Expires header.

lastModified

fun HttpMessage.lastModified(): Date?

Parse Last-Modified header.

setCookie

fun HttpMessage.setCookie(): List<Cookie>

Parse Set-Cookie header value.

vary

fun HttpMessage.vary(): List<String>?

Parse Vary header value.

Inheritors

HttpRequest

interface HttpRequest : HttpMessage, CoroutineScope

A request for HttpClient, first part of HttpClientCall.

HttpResponse

abstract class HttpResponse : 
    HttpMessage,
    CoroutineScope,
    Closeable

A response for HttpClient, second part of HttpClientCall.