HttpRequest

http.ql

Represents a single HTTP request.

Constructor Overview

Constructor Description
HttpRequest(method, url, headers, body)

Creates a new HTTP request. Recommended to use the static factory methods instead.

Function Overview

Function Description
static fun create(method, url, headers, body) Creates a new HTTP request with a specified method, to be sent with HttpClient.send().
static fun createGet(url, headers, body) Creates a new HTTP GET request to be sent with HttpClient.send().
static fun createPost(url, headers, body) Creates a new HTTP GET request to be sent with HttpClient.send().

Constructors

HttpRequest(method, url, headers, body) link

Creates a new HTTP request. Recommended to use the static factory methods instead.

Functions

static fun create(method, url, headers, body) link

Creates a new HTTP request with a specified method, to be sent with HttpClient.send().

Params
method ( string )

The HTTP method to use for the request

url ( string )

The URL to send the request to

headers ( Map )

The headers to send with the request

body

The body of the request. May either be a string or a Map

Returns HttpRequest

The created request

http:http.ql
static fun createGet(url, headers, body) link

Creates a new HTTP GET request to be sent with HttpClient.send().

Params
url ( string )

The URL to send the request to

headers ( Map )

The headers to send with the request

body

The body of the request. May either be a string or a Map

Returns HttpRequest

The created request

http:http.ql
static fun createPost(url, headers, body) link

Creates a new HTTP GET request to be sent with HttpClient.send().

Params
url ( string )

The URL to send the request to

headers ( Map )

The headers to send with the request

body

The body of the request. May either be a string or a Map

Returns HttpRequest

The created request

http:http.ql