PostURL
PostUrl is used to initiate a POST request to an HTTP server. POST requests are used to send data to an HTTP server.
Syntax
PostUrl (STRING document, STRING data)
Where:
Document
is a string (example:index.html
)Data
is a string (example:value1=data1
)
Returns
No data returned.
Example
This script will do a POST request and print out the return code:
Function Main
Dim HTTPObj as Object
ip = "www.gfi.com"
port = 80
Set HTTPobj = HTTP.Connect (ip,port)
'Set up the request type
HTTPobj.PostURL "/", "test"
'to pass through the proxy with automatic authentication
'Authentication needs to be set to 1
HTTPobj.Authentication = 1
'Send the POST request
HTTPResponse = HTTPobj.SendRequest ()
echo "Result: " + cstr(HTTPResponse)
End Function