http.ql
Represents a single HTTP request.
Constructor | Description |
---|---|
HttpRequest(method, url, headers, body) | Creates a new HTTP request. Recommended to use the static factory methods instead. |
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(). |
Creates a new HTTP request. Recommended to use the static factory methods instead.
Creates a new HTTP request with a specified method, to be sent with HttpClient.send()
.
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 |
The created request
Creates a new HTTP GET request to be sent with HttpClient.send()
.
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 |
The created request
Creates a new HTTP GET request to be sent with HttpClient.send()
.
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 |
The created request