HttpResponse

sealed interface HttpResponse : ProtocolResponse

Immutable container for an HTTP response

Properties

Link copied to clipboard
abstract val body: HttpBody

The response body

Link copied to clipboard
abstract val headers: Headers

The response headers

Link copied to clipboard
abstract val status: HttpStatusCode

The response status code

Inherited properties

Link copied to clipboard
abstract val summary: String

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