Api Request Builder
data class ApiRequestBuilder( val client: ApiClient, val httpMethod: HttpMethod, val host: EndpointHost, val path: String)
Content copied to clipboard
The builder class to construct api request.
Constructors
Link copied to clipboard
fun ApiRequestBuilder( client: ApiClient, httpMethod: HttpMethod, host: EndpointHost, path: String)
Content copied to clipboard
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Extensions
Link copied to clipboard
fun ApiRequestBuilder.formBody(vararg pairs: Pair<String, Any?>, mode: EmulationMode? = null)
Content copied to clipboard
Creates "application/x-www-form-urlencoded" content.
Link copied to clipboard
fun ApiRequestBuilder.header( key: String, value: Any?, mode: EmulationMode? = null)
Content copied to clipboard
Sets a header key with value, or update existing one with value.
fun ApiRequestBuilder.header(headers: Headers, mode: EmulationMode? = null)
Content copied to clipboard
Adds existing Headers instance to headers.
Link copied to clipboard
fun ApiRequestBuilder.headers(vararg pairs: Pair<String, Any?>, mode: EmulationMode? = null)
Content copied to clipboard
Sets header keys with value, or update existing one with value.
Link copied to clipboard
fun ApiRequestBuilder.jsonBody(vararg pairs: Pair<String, Any?>, mode: EmulationMode? = null)
Content copied to clipboard
fun ApiRequestBuilder.jsonBody(json: JsonObject, mode: EmulationMode? = null)
Content copied to clipboard
Creates "application/json" content.
Link copied to clipboard
fun ApiRequestBuilder.multiPartBody(mode: EmulationMode? = null, block: FormBuilder.() -> Unit)
Content copied to clipboard
Creates "multipart/form-data" content.
Link copied to clipboard
fun ApiRequestBuilder.parameter( key: String, value: Any?, mode: EmulationMode? = null)
Content copied to clipboard
Sets a parameter key with value, or update existing one with value.
Link copied to clipboard
fun ApiRequestBuilder.parameters(vararg pairs: Pair<String, Any?>, mode: EmulationMode? = null)
Content copied to clipboard
Sets parameter keys with value, or update existing one with value.
Link copied to clipboard
Shorthand extension to ApiClient.
Link copied to clipboard
Url string.