Skip to main content

GET-Request

Command Description

Sends an HTTP GET request to a given URL and returns the server response

Command Prototype

sRet = HTTP.Get(sURL, sForm, iTimeout)

Parameter Description

ParameterRequiredTypeDefaultDescription
sURLTruestring""URL of the Get page
sFormTrueexpression{}The data sent along with the GET request. Can be a string or a dictionary
iTimeoutTruenumber60000Timeout (ms)

return

sRet,The variable used to save the output of the command.

Demo

TracePrint("--------------------------Get data------------------- ---------") 
//-------------------------------------------------------------------------------
//[Remarks] HTTP.Get gets network data.
//Input parameter 1:
// sURL--link address. Note: the link address of the Get page
// sForm--form data. Note: The form data passed in Get can be a string or a dictionary
// iTimeout--timeout time (milliseconds). Note: Timeout time (milliseconds)
//out parameters:
// sRet--The variable to which the output of the function call is saved.
//Command prototype: sRet = HTTP.Get(sURL, sForm, iTimeout)
sRet = HTTP.Get("https://www.uibot.com.cn/", {}, 60000)
TracePrint (sRet)