Page History
Creates and returns an error response.
Syntax
Code Block |
---|
Response = HTTP_Services('GetErrorResponse') |
Returns
A JSON formatted object that contains the URL, HTTP method, HTTP status code, phrase, and any system errors (if any).
Parameters
N/A
Remarks
This is intended to be used when there is no response body to return to the client. This response will contain the current response status and any error information stored using Error_Services.
Syntax
Code Block |
---|
Response = HTTP_Services('GetErrorResponse') |
Returns
N/A
Parameters
N/A
Remarks
The RunHTTPService service is the official way to call specific web service APIs. The HTTPService argument should contain the same name found in the URL segment that corresponds with the API resource. For instance, for the /customers
URL, the HTTPService argument should contain the value of customers. This will call the HTTP_CUSTOMERS_SERVICES
BASIC+ routine.
Here is an example of what this can look like:
{
"URL" : "http://api.contacts.com/v1/",
"method" : "GET",
"phrase" : "Unauthorized (RFC 7235)",
"status" : 401
}
...