ResponseMetadata

class ResponseMetadata(val statusCode: Int, headers: Map<String, List<String>>)

HTTP status and response headers, available before the response body is decoded or streamed.

Constructors

Link copied to clipboard
constructor(statusCode: Int, headers: Map<String, List<String>>)

Properties

Link copied to clipboard

Snapshot of all response headers with their original names and values.

Link copied to clipboard

Requests remaining in the current rate-limit window.

Link copied to clipboard

Tokens remaining in the current rate-limit window.

Link copied to clipboard

Request limit for the current rate-limit window, when supplied as an integer.

Link copied to clipboard

Server-supplied duration until the request limit resets.

Link copied to clipboard

Server-supplied duration until the token limit resets.

Link copied to clipboard

Token limit for the current rate-limit window, when supplied as an integer.

Link copied to clipboard

Server request identifier, when supplied.

Link copied to clipboard

HTTP response status code.

Functions

Link copied to clipboard
fun header(name: String): String?

First value for name, or null when absent.

Link copied to clipboard

Values for name, matched without regard to case.