Construct an HTTPClient from a BaseHTTPClient
the BaseHTTPClient used
Construct an HTTPClient from a URL (baseServer+port) and a token
Send a DELETE request. If no content-type present, adds the header "content-type: application/json" and data is serialized in JSON (if not empty)
Send a GET request.
The path of the request.
An object containing the query parameters of the request.
An object containing additional request headers to use.
Options object to use to decode JSON responses. See utils.parseJSON for the options available.
Response object.
Send a POST request. If no content-type present, adds the header "content-type: application/json" and data is serialized in JSON (if not empty)
Parse JSON using either the built-in JSON.parse or utils.parseJSON depending on whether jsonOptions are provided or not
JSON data
Status of the response (used in case parseJSON fails)
Options object to use to decode JSON responses. See utils.parseJSON for the options available.
Convert a BaseHTTPClientResponse into a full HTTPClientResponse Parse the body in Modifies in place res and return the result
Prepare an error with a response (the type of errors BaseHTTPClient are supposed to throw) by adding the status and preparing the internal response
Serialize the data according to the requestHeaders Assumes that requestHeaders contain a key "content-type" If the content-type is "application/json", data is JSON serialized Otherwise, data needs to be either an UTF-8 string that is converted to an Uint8Array or an Uint8Array
Generated using TypeDoc
HTTPClient is a wrapper around a BaseHTTPClient It takes care of setting the proper "Accept" header and of decoding the JSON outputs.