HttpMessageBuilder

interface HttpMessageBuilder

A builder message either for the client or the server, that has a headers builder associated.

Properties

headers

abstract val headers: HeadersBuilder

MessageBuilder HeadersBuilder

Extension Functions

charset

fun HttpMessageBuilder.charset(charset: Charset): Unit?
fun HttpMessageBuilder.charset(): Charset?

Parse charset from Content-Type header value.

contentLength

fun HttpMessageBuilder.contentLength(length: Int): Unit
fun HttpMessageBuilder.contentLength(): Long?

Parse Content-Length header value.

contentType

fun HttpMessageBuilder.contentType(type: ContentType): Unit

Set Content-Type header.

fun HttpMessageBuilder.contentType(): ContentType?

Parse Content-Type header value.

cookies

Parse Set-Cookie header value.

etag

Parse E-Tag header value.

expires

fun HttpMessageBuilder.expires(): Date?

Parse Expires header.

ifModifiedSince

fun HttpMessageBuilder.ifModifiedSince(date: Date): Unit

Set If-Modified-Since header.

ifNoneMatch

fun HttpMessageBuilder.ifNoneMatch(value: String): Unit

Set If-None-Match header value.

lastModified

fun HttpMessageBuilder.lastModified(): Date?

Parse Last-Modified header.

maxAge

fun HttpMessageBuilder.maxAge(seconds: Int): Unit

Append Max-Age header value.

userAgent

fun HttpMessageBuilder.userAgent(content: String): Unit

Set User-Agent header value.

vary

Parse Vary header value.

Inheritors

HttpRequestBuilder

class HttpRequestBuilder : HttpMessageBuilder

Class for building HttpRequestData.