ApiRequest

interface ApiRequest

A specification for an HTTP API request to be executed by an ApiExecutor.

This interface defines all the necessary components of a request, such as the target URI, HTTP method, headers, and body.

Inheritors

Functions

Link copied to clipboard
abstract fun headers(): Map<String, List<String>>

Returns a map of HTTP headers to be included with the request.

Link copied to clipboard
abstract fun method(): ApiRequestMethod

The HTTP method to be used for the request (e.g., GET, POST).

Link copied to clipboard
open fun query(): Map<String, String>?

Returns a map of URL query parameters to be appended to the request URI.

Link copied to clipboard
abstract fun url(): String

Returns the complete URL for the request, including the scheme, host, and path.