HttpCall

open class HttpCall(val request: HttpRequest, val response: HttpResponse, val requestTime: <Error class: unknown class> = Instant.now(), val responseTime: <Error class: unknown class> = Instant.now(), val coroutineContext: <Error class: unknown class> = EmptyCoroutineContext)

A single request/response pair

Parameters

request

the original complete request

response

the HttpResponse for the given request

requestTime

the time the request was made by the engine

responseTime

the time the response was received. This is a rough estimate of Time-to-first-header (TTFH) as reported by the engine.

coroutineContext

the call context

Constructors

Link copied to clipboard
constructor(request: HttpRequest, response: HttpResponse, requestTime: <Error class: unknown class> = Instant.now(), responseTime: <Error class: unknown class> = Instant.now(), coroutineContext: <Error class: unknown class> = EmptyCoroutineContext)

Properties

Link copied to clipboard
open val coroutineContext: <Error class: unknown class>
Link copied to clipboard
Link copied to clipboard
val requestTime: <Error class: unknown class>
Link copied to clipboard
Link copied to clipboard
val responseTime: <Error class: unknown class>

Functions

Link copied to clipboard
open fun cancelInFlight()

Hook to cancel an in-flight request

Link copied to clipboard
open fun copy(request: HttpRequest = this.request, response: HttpResponse = this.response): HttpCall

Inherited functions

Link copied to clipboard
suspend fun HttpCall.complete()

Close the underlying response and cleanup any resources associated with it. After closing the response body is no longer valid and should not be read from.