Package-level declarations

Types

Link copied to clipboard
interface DeferredHeaders : ValuesMap<Deferred<String>>

Immutable mapping of case insensitive HTTP header names to list of Deferred values.

Link copied to clipboard

Build an immutable HTTP deferred header map

Link copied to clipboard
interface Headers : ValuesMap<String>

Immutable mapping of case insensitive HTTP header names to list of String values.

Link copied to clipboard

Build an immutable HTTP header map

Link copied to clipboard
sealed class HttpBody

HTTP payload to be sent to a peer

Link copied to clipboard
open class HttpCall(val request: HttpRequest, val response: HttpResponse, val requestTime: Instant = Instant.now(), val responseTime: Instant = Instant.now(), val coroutineContext: CoroutineContext = EmptyCoroutineContext) : CoroutineScope

A single request/response pair

Link copied to clipboard
Link copied to clipboard

Base exception class for HTTP errors

Link copied to clipboard

Represents an HTTP verb

Link copied to clipboard
data class HttpStatusCode(val value: Int, val description: String)

Container for an HTTP status code

Inherited functions

Link copied to clipboard
Link copied to clipboard

Check if the given status code is an informational code (HTTP codes 100 to 199 are considered informational)

Link copied to clipboard

Check if the given status code is a success code (HTTP codes 200 to 299 are considered successful)

Link copied to clipboard
suspend fun HttpBody.readAll(): ByteArray?

Consume the HttpBody and pull the entire contents into memory as a ByteArray. Only do this if you are sure the contents fit in-memory as this will read the entire contents of a streaming variant.

Link copied to clipboard

Convert an HttpBody variant to the corresponding ByteStream variant or null if empty.

Link copied to clipboard

Convert a ByteArray into an HttpBody

Convert a String into an HttpBody