Difference between revisions of "ISKernel:webrequest (Object Type)"
Jump to navigation
Jump to search
Line 7: | Line 7: | ||
*[[ISKernel:ewebrequeststate (Object Type)|ewebrequeststate]] '''State''': State of the webrequest, e.g. Idle, Queued, Working, Completed, Aborted | *[[ISKernel:ewebrequeststate (Object Type)|ewebrequeststate]] '''State''': State of the webrequest, e.g. Idle, Queued, Working, Completed, Aborted | ||
*[[ISKernel:ewebrequestas (Object Type)|ewebrequestas]] '''InterpretAs''': How to interpret the server's response content, such as file, string, json or binary | *[[ISKernel:ewebrequestas (Object Type)|ewebrequestas]] '''InterpretAs''': How to interpret the server's response content, such as file, string, json or binary | ||
− | *[[ObjectType:string|string]] URL: The URL to request | + | *[[ObjectType:string|string]] '''URL''': The URL to request |
*[[ObjectType:jsonarray|jsonarray]] '''POST''': A JSON array containing a list of objects that describe each POST parameter | *[[ObjectType:jsonarray|jsonarray]] '''POST''': A JSON array containing a list of objects that describe each POST parameter | ||
*[[ObjectType:string|string]] Filename: The output filename | *[[ObjectType:string|string]] Filename: The output filename | ||
*[[ObjectType:jsonobject|jsonobject]] '''Result''': A JSON object containing response codes and data received as a result of the request | *[[ObjectType:jsonobject|jsonobject]] '''Result''': A JSON object containing response codes and data received as a result of the request | ||
− | *[[ObjectType:binary|binary]] Binary: A binary object containing the server's response content | + | *[[ObjectType:binary|binary]] '''Binary''': A binary object containing the server's response content |
Revision as of 11:27, 12 November 2019
Contents
Description
webrequest | |
Defined By | Inner Space |
Inherits | none |
Reduces To | webrequest |
Variable Object Type | none |
Uses Sub-Types | no |
C/C++ Type |
Manages a web request, e.g. to GET or POST with a http or https URL
Members
- 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
- 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
Methods
- 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)