ISKernel:webrequest (Object Type)

From Lavish Software Wiki
Revision as of 11:01, 14 November 2019 by Lax (talk | contribs) (Lax moved page ISKernel:webrequest (Data Type) to ISKernel:webrequest (Object Type))
(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to navigation Jump to search

Description

Object Type Vitals
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, 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


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)

See Also