Difference between revisions of "ISKernel:webrequest (Object Type)"
Jump to navigation Jump to search
Latest revision as of 11:01, 14 November 2019
|Defined By||Inner Space|
|Variable Object Type||none|
Manages a web request, e.g. to GET or POST with a http or https URL
- ewebrequeststate State: State of the webrequest, e.g. Idle, Queued, Working, Completed, Aborted
- ewebrequestas InterpretAs: How to interpret the server's response content, such as file, string, json or binary
- string URL: The URL to request
- jsonarray POST: A JSON array containing a list of objects that describe each POST parameter
- string Filename: The output filename, when interpreting as file
- jsonobject Result: A JSON object containing response codes and data received as a result of the request
- binary Binary: A binary object containing the server's response content
- FromJSON[json]: Initializes the webrequest via a JSON object. The webrequest must be in its Idle (Reset) state
- Reset: Resets the webrequest to its original Idle state, clearing any settings. The webrequest must not be in Working state. If in Queued state, this will act as :Abort instead
- Begin: Begins the webrequest. The webrequest must be in Idle state, and a URL must be set
- Abort: Aborts the webrequest. The webrequest must be in Queued state; an aborted webrequest will change to Aborted state when it otherwise would have changed to Working state.
- SetURL[url]: Sets the URL to use. The webrequest must be in Idle or Queued state to change the URL.
- InterpretAs[as]: Tells the webrequest to provide the result as one of string, json, binary
- InterpretAs[file,absolute filename]: Tells the webrequest to provide the result as a file, to the specified absolute filename (it is recommended to include the full path)