HTTPRequest.this

Constructor.

Use named arguments to only assign values to certain parameters.

struct HTTPRequest
this
(
const int id
,
const string url
,
const string authorisationHeader = string.init
,
const string clientID = string.init
,
const bool verifyPeer = true
,
const string caBundleFile = string.init
,
shared string[string] customHeaders = null
,,
immutable(ubyte)[] body = null
,
const string contentType = "application/json"
,
const string caller = __FUNCTION__
)

Parameters

id int

Unique ID of the request.

url string

URL of the request.

authorisationHeader string

Optional value of an Authorization header.

clientID string

Optional value of a Client-ID header.

verifyPeer bool

Optionally whether or not to verify peers.

caBundleFile string

Optional path to a certificate bundle file.

customHeaders string[string]

Optional string[string] associative array of custom headers.

verb HTTPVerb

Optional HTTP verb, default get.

body immutable(ubyte)[]

Optional textual body.

contentType string

Optional HTTP content type of the request, default "application/json".

caller string

Name of the calling function.