Net.HttpRequest
enum HttpRequestSourcecase HttpRequest({ body = Option[Body], connectTimeout = Option[Duration], followRedirects = Bool, headers = Map[String, List[String]], method = Method, requestTimeout = Option[Duration], url = String })An HTTP request with method, URL, multi-valued headers, and optional body.
Definitions
Returns the text body of the request r, or None if absent or binary.
Returns the binary body of the request r, or None if absent or text.
Returns the connect timeout of the request r.
Creates a PATCH request to the given url with the given body.
Creates a POST request to the given url with the given body.
Creates a PUT request to the given url with the given body.
Returns the request timeout of the request r.
Sets the header name to value on the request r, replacing any existing values.
Sets the Accept header to accept on the request r.
Sets the Authorization header to Bearer <token> on the request r.
Sets the body of the request r to the given text body.
Sets the body of the request r to the given binary body.
Sets the connect timeout (time to establish the TCP connection).
Sets the Content-Type header to contentType on the request r.
Sets whether the request r should follow HTTP redirects.
Adds the header name with value value to the request r.
If the header already exists, the value is appended to the list of values.
Merges the given headers h into the request r.
For headers that already exist, the new values are appended to the existing values.
Appends a query parameter name=value to the URL of the request r.
The name and value are URL-encoded.
Appends multiple query parameters to the URL of the request r.
The names and values are URL-encoded.