Builder

class Builder

Constructors

Builder
Link copied to clipboard
open fun Builder()

Functions

body
Link copied to clipboard
open fun body(@Nullable body: Array<Byte>): HttpRequest.Builder
HTTP Body data transmitted in an HTTP transaction message immediately following the headers if there is any.
build
Link copied to clipboard
open fun build(): HttpRequest
headers
Link copied to clipboard
open fun headers(@NonNull headers: HashMap<String, String>): HttpRequest.Builder
HTTP headers to include.
keepCompression
Link copied to clipboard
open fun keepCompression(keepCompression: Boolean): HttpRequest.Builder
Keep compression flag.
method
Link copied to clipboard
open fun method(@NonNull method: HttpMethod): HttpRequest.Builder
HTTP defines a set of request methods to indicate the desired action to be performed for a given resource.
networkRestriction
Link copied to clipboard
open fun networkRestriction(@NonNull networkRestriction: NetworkRestriction): HttpRequest.Builder
Restrict the request to the specified network types.
timeout
Link copied to clipboard
open fun timeout(timeout: Long): HttpRequest.Builder
Timeout defines how long, in seconds, the request is allowed to take in total (including connecting to the host).
uaComponents
Link copied to clipboard
open fun uaComponents(@NonNull uaComponents: UAComponents): HttpRequest.Builder
Application and SDK information for generating a User-Agent string.
url
Link copied to clipboard
open fun url(@NonNull url: String): HttpRequest.Builder
URL the request should be sent to