|
EDK »
RequestThis page explains how to initiate custom HTTP connections using Lua script that are logged to the Sandcat Live Headers.
Loading or sending a custom HTTP requestExample
If you want to load the request using the browser, just replace the sendrequest() method with loadrequest() KeysThe following keys can be provided:
method - the HTTP method (GET, POST, etc). Default GET
url - the request URL (if not supplied, the tab URL will be used as URL)
postdata - the request data
headers - custom request headers
ignorecache - If supplied, and is false, may load the page from the cache. Default true.
useauth - If supplied, and is true, uses cached authentication credentials. Default true.
usecookies - If supplied, and is false, ignores cookies. Default true.
details - a short description for the request
Logging a request from a custom HTTP client classExampleThis one uses the Selenite's httprequest class, included with Sandcat 4:
KeysThe following keys can be provided:
method (required) - the request method
url (required) - the request URL. In case this is a low level request you can supply a host and a port key instead of an URL key.
postdata - the request data
headers - the request headers
responseheaders - the response headers
responsefilename - the name of a temporary file that must contain the response text or stream. The file will be automatically deleted after its contents are added to the Live Headers cache.
status - if not supplied, the status code will be read from the response headers
details - a short description for the request
|
Developer Language |
© 2023 Syhunt |