Skip to main content

POST-Request

Command Description

Submit a form by HTTP.Post

Command Prototype

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

Parameter Description

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

return

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

Demo

TracePrint("----------------------------Post submit form------------------- ---------") 
//-------------------------------------------------------------------------------
//[Remarks] HTTP.Post submits the form to the web page.
//Input parameter 1:
// sURL--link address. Note: The link address of the Post page (for example: http://192.168.0.93:5000/admin)
// sForm--form data. Note: The form data passed in Post 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.Post(sURL, sForm, iTimeout)
sRet = HTTP.Post(sURL, {"password": "Q3B0YnRwdHA3Nw==","rememberLogin": True,"userName": "15700740008"}, 60000)
TracePrint (sRet)