HttpResponse

interface HttpResponse(source)

A response passed to the HttpTransport.get handler.

Properties

Link copied to clipboard
abstract val statusCode: Int

HTTP status code.

Functions

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

Value of response header name (case-insensitive), or null.

Link copied to clipboard
abstract suspend fun read(buffer: ByteArray): Int

Reads up to buffer.size body bytes. Returns the count read, or -1 at the end of the body.