class HttpRequest
source · line 12public
public class HttpRequest internal constructor(
/**
* The validated http or https request URL.
*/
public val url: Url,
/**
* The case-sensitive HTTP method token.
*/
public val method: String = "GET",
fields: List<HttpField> = emptyList<HttpField>(),
/**
* The body plan, including replayability and metadata.
*/
public val body: RequestBody = RequestBody.Empty,
/**
* Call-specific overrides and callbacks.
*/
public val options: HttpCallOptions = httpCallOptions()
)
An immutable HTTP request with validated method/fields, body plan, and call options. Host and transfer framing are generated by the client; proxy credentials belong to proxy configuration.
Extensions
public fun HttpRequest.copy(configure: HttpRequestBuilder.() -> Unit = {}): HttpRequest· scoop:scoop.http.client:0.1.0
property body
source · line 25public
public val body: RequestBody = RequestBody.Empty
get: public read-only
The body plan, including replayability and metadata.
property fields
source · line 39public
public val fields: Array<HttpField>
get: public read-only
Prepared regular fields, including metadata derived from the body.
getter get
source · line 39public
get(): Array<HttpField>
property method
source · line 20public
public val method: String = "GET"
get: public read-only
The case-sensitive HTTP method token.
property url
source · line 16public
public val url: Url
get: public read-only
The validated http or https request URL.
property options
source · line 29public
public val options: HttpCallOptions = httpCallOptions()
get: public read-only
Call-specific overrides and callbacks.