Sends the request to an API-X API server.
The response of the request.
Instances of Error
if the request fails and the API-X
backend does not have a response object.
Note: Sending the same request more than once will cause it to fail as API-X backends do not accept repeat requests. Additionally, if the request is 'too old', it may fail. The API-X server determines what 'too old' means. This is to deter keeping request objects for too long as they should be destroyed quickly for security reasons.
Static
makeSends a request to an API-X API server.
The request that is sent to the server.
The response of the request.
Instances of Error
if the request fails and the API-X
backend does not have a response object.
Note: Sending the same request more than once will cause it to fail as API-X backends do not accept repeat requests. Additionally, if the request is 'too old', it may fail. The API-X server determines what 'too old' means. This is to deter keeping request objects for too long as they should be destroyed quickly for security reasons.
Creates a new request object to make an API-X-compatible request.
The configuration of the request.
Optional
Readonly
dataThe HTTP Body to send with the request, if any.
Readonly
httpThe HTTP Method to use with the request.
Readonly
urlThe URL to which the request will be made.
Gets the current cookies as a record.
A record of cookie name-value pairs.
Adds a single cookie.
The name of the cookie.
The value of the cookie.
Gets the value of a cookie.
The name of the cookie (case-sensitive).
The value of the cookie or undefined
.
Removes a cookie by name.
The name of the cookie to remove.
Sets multiple cookies at once. This method will overwrite cookies if needed, but it will keep existing ones that don't conflict with newly set ones.
A record of cookie name-value pairs to set.
The HTTP headers in the request, excluding read-protected headers.
These will not include any headers that contain sensitive information such as request signature.
Returns the value of any unprotected or write-protected header in the request.
This will not get the Cookie
unless it's set with setHeader
. To get a cookie,
use getCookie
or cookies
.
The case-insensitive name of the header.
The value of the header or undefined.
Sets a header in the request. This will override any non-protected header in the request.
The header name (e.g.: X-Custom-Header). The header will be set lowercased.
The value in the header.
Unsets a header in the request. This will override any non-protected header in the request.
The header name (e.g.: X-Custom-Header). Case-insensitive.
A class that can send a request compatible with API-X servers.