Setup Factory 10

HTTP.Submit

HTTP.Submit

This is the first topic This is the last topic  

HTTP.Submit

This is the first topic This is the last topic  

OverviewExamples

string HTTP.Submit (

string   URL,

table   Values,

number   Method = SUBMITWEB_GET,

number   Timeout = 20,

number   Port = 80,

table   AuthData = nil,

table   ProxyData = nil

string   CustomHeaders = nil )

Example 1

myvalues = {Name="Brian", Company="Indigo Rose"};

headers = "Authorization: pvh#d*Bz5Y96\r\nAccept: application/json";

result = HTTP.Submit("http://www.indigorose.com/myscript.php", myvalues, SUBMITWEB_GET, 20, 80, nil, nil, headers);

The first line of code creates a table called "myvalues" containing two named value pairs. The first index of the table is "Name,"and has the associated value "Brian." The second index is "Company" and it's associated value is "Indigo Rose." The named value pairs in this table are then submitted to the script located at "http://www.indigorose.com/myscript.php" using an HTTP.Submit action.

Additionally, two custom headers are being sent with this request, setting the "Authorization" and "Accept" parameters.

 

Example 2

sResult = HTTP.Submit("http://www.mysearchengine.com/search.php", {search="SetupFactory"}, SUBMITWEB_GET, 20, 80, nil, nil);

This example submits the query "SetupFactory" to a script found at http://www.mysearchengine.com.  The parameter is passed using an inline table, and the results are stored in the variable sResult.

See also: Related Actions


Learn More: Indigo Rose Software - Setup Factory - Buy Now - Contact Us