Request

interface Request

HTTP request based on coroutines.

Request can produce a complete response by calling execute or can produce a flow of events by calling start.

Types

Link copied to clipboard
interface Event

Events representing the state of the HTTP request/response.

Functions

Link copied to clipboard
abstract suspend fun body(): BufferedSource?

Body data to send with request.

Link copied to clipboard
abstract suspend fun execute(): Response

Executes the request and returns a complete response.

Link copied to clipboard
abstract fun start(): Flow<Request.Event>

Starts the HTTP request and returns a Flow of events.

Properties

Link copied to clipboard
abstract val headers: Headers

Headers to send with request.

Link copied to clipboard
abstract val method: Method

HTTP method for request.

Link copied to clipboard
abstract val uri: URI

Target URL for request.