ApiResponse

interface ApiResponse

Represents the response from an HTTP API request executed by an ApiExecutor.

This interface provides access to all components of the response, including the status code, headers, and body.

Properties

Link copied to clipboard
abstract val body: ByteArray?

The raw response body as a byte array, or null if there is no body.

Link copied to clipboard
abstract val contentLength: Long

The length of the response body in bytes, as reported by the Content-Length header.

Link copied to clipboard
abstract val contentType: String

The MIME type of the response body, as reported by the Content-Type header.

Link copied to clipboard
abstract val headers: Map<String, List<String>>

A map of all response headers.

Link copied to clipboard
abstract val statusCode: Int

The HTTP status code from the server's response (e.g., 200 for OK).