HttpResponse

fun HttpResponse(status: Int, url: Url, configure: HttpResponse.Builder.() -> Unit = {}): HttpResponse(source)

Builds an HttpResponse with status from url and the optional parts set in configure.

Stable Core.

Return

the response.

Parameters

status

the status, in 100..599.

url

the URL the response came from.

configure

sets the headers, the redirect chain and the body; empty by default.

Throws

if status is outside 100..599.