core / pragma.http / TimedHttpClient /

TimedHttpClient #

class TimedHttpClient(httpClient: HttpClient, timerName: String, timerProxyFactory: TimerProxyFactory) : HttpClient

Issues outbound requests and records their timing. The sensitiveValues parameter on each helper declares the secrets and provider account IDs the request carries, which are redacted from the exceptions thrown on failure. See HttpRequest.

Constructors #

TimedHttpClient

@JvmOverloads

fun TimedHttpClient(timerName: String, service: Service, clientCertificate: ClientCertificate? = null)

TimedHttpClient

@JvmOverloads

fun TimedHttpClient(timerName: String, pragmaNode: PragmaNode, clientCertificate: ClientCertificate? = null)

TimedHttpClient

fun TimedHttpClient(httpClient: HttpClient, timerName: String, timerProxyFactory: TimerProxyFactory)

Functions #

NameSummary

issueRequest

open suspend override fun issueRequest(request: HttpRequest): HttpResponse

Fails with ktor’s ResponseException when the server answered with an error status, and with HttpRequestFailedException when it did not answer at all. Cancellation propagates untouched.