HttpRequest
constructor(url: AbsoluteUrl, method: HttpRequest.Method = Method.GET, headers: Map<String, List<String>> = mapOf(), body: HttpRequest.Body? = null, extras: Bundle = Bundle(), connectTimeout: Duration? = null, readTimeout: Duration? = null, allowUserInteraction: Boolean = false)
Parameters
url
Address of the remote resource to request.
method
HTTP method to use for the request.
headers
Additional HTTP headers to use.
body
Content put in the body of the HTTP request.
extras
Bundle of additional information, which might be used by a specific implementation of HTTPClient.
connectTimeout
Timeout used when establishing a connection to the resource. A null timeout is interpreted as the default value, while a timeout of zero as an infinite timeout.
readTimeout
Timeout used when reading the input stream. A null timeout is interpreted as the default value, while a timeout of zero as an infinite timeout.
allowUserInteraction
If true, the user might be presented with interactive dialogs, such as popping up an authentication dialog.