Package-level declarations

Types

Link copied to clipboard
sealed interface HttpResponse : ProtocolResponse

Immutable container for an HTTP response

Functions

Link copied to clipboard
fun HttpResponse(status: HttpStatusCode, headers: Headers = Headers.Empty, body: HttpBody = HttpBody.Empty): HttpResponse

Use the default HTTP response implementation

Inherited functions

Link copied to clipboard
fun HttpResponse.copy(status: HttpStatusCode = this.status, headers: Headers = this.headers, body: HttpBody = this.body): HttpResponse

Replace the response body

Link copied to clipboard

Get all HTTP header values associated with the given name.

Link copied to clipboard

Get an HTTP header value by name. Returns the first header if multiple headers are set

Link copied to clipboard

Get the HTTP status code of the response

Link copied to clipboard