Public Member Functions | |
| post (url, data, origin) | |
| Make a POST request to the specified url. | |
| get (url, origin) | |
| Make a GET request to the specified url. | |
Member Function Documentation
◆ get()
|
inline |
Make a GET request to the specified url.
- Parameters
-
{string} url The url to send a request to {string | null} origin The value to use for the Origin header when making the request
- Returns
- {Promise} The resolve function will be passed the content from the response and the reject function will be passed an object with 3 properties: headers = HTTP headers in the response statusCode = HTTP status code of response content = The content of the response or an error message
◆ post()
|
inline |
Make a POST request to the specified url.
- Parameters
-
{string} url The url to send a request to {object | null} data The data to send in the body of the request {string | null} origin The value to use for the Origin header when making the request
- Returns
- {Promise} The resolve function will be passed the content from the response and the reject function will be passed an object with 3 properties: headers = HTTP headers in the response statusCode = HTTP status code of response content = The content of the response or an error message
