doRequest
Perform a request to the API Hub.
Signatures
- Paramate.Configurator.doRequest( object options )
Details
The function performs a request to the API Hub using the settings of the configurator. Parameters can be set inside the options object argument.
Parameters
- options
-
Object containing parameters for the request.
- options.url
-
The URL for the request.
- options.method
-
Request method. (default: "GET")
- options.tokenAuthorization
-
Boolean flag defining whether token authorization is used. (default: "true")
- options.API_KEY_Authorization
-
Boolean flag defining whether API key authorization used. (default: "true")
- options.responseType
-
The expected response type (default: "json")
- options.contentType
-
The used content type (default: "application/json;charset=UTF-8")
- options.addHeader
-
Object containting additional request header entries.
- options.progress
-
The progress event handler
- options.data
-
The data to be sent with the request
Return value
A promise that resolves with the response of the request, or rejects with the following object:
{
status: xhr.status,
statusText: xhr.statusText,
response: xhr.response
}