fetchUrl
Type
command
Syntax
fetchUrl <pUrl>, <pMethod>, <pHeaders>, <pBody>, <pCallback>, <pProgressCallback>, [<pSettingsD>]
Description
If the callback parameter is not empty the request will be asynchronus and when complete the callback will be sent to the object that accessed the API. The callback will be sent with seven parameters:
- The request URL
- The request ID which will be the value of the it variable after calling the command
- The request status
- The HTTP response code
- The data returned which will be the same data as documented for the it variable in a synchronous request.
- The request headers
- The response Headers
Parameters
Name | Type | Description |
---|---|---|
pUrl | The Request URL | |
pMethod | The request Method, i.e GET, POST etc. | |
pHeaders | The headers for the request | |
pBody | The post data if it is a POST request | |
pCallback | The handler to call when the request is complete. If empty the command will block until complete. | |
pProgressCallback | The handler to call when the request is being excecuted, to display its current status |