User Guide
HTTPProvider Object 267
HeadAsync
Syntax HeadAsync();
Description Performs an HTTP HEAD method request asynchronously.
Post
Syntax Post();
Description Performs an HTTP POST method request.
Example
Sample POST script
//*******************************************//
// This script illustrates a POST method by which
// three FORM variables are submitted to a ColdFusion page.
//***********************************************//
function Main () {
var app = Application;
var httpPro = app.HTTPProvider;
httpPro.URL = "http://127.0.0.1/httptest.cfm";
var CustomerID = "John Doe";
var ProductID = "3456";
var DateSold = "10/10/99";
var PostStream =’Customer_ID=’ + httpPro.URLEncode( CustomerID ) +
’&ProductNumber=’ + httpPro.URLEncode( ProductID ) +
‘&SaleDate=’ + httpPro.URLEncode( DateSold );
httpPro.SendStreamAsString = PostStream; httpPro.Post();
var sOutput = httpPro.ReceivedStreamAsString;
app.activeDocument.Text = sOutput;
}
PostAsync
Syntax PostAsync();
Description Performs an HTTP POST method request asynchronously.
SaveReceivedStreamToFile
Syntax SaveReceivedStreamToFile(FilePath: OleVariant; bOverwrite: wordbool):
OleVariant;
Description Boolean. Saves the received stream into a file and returns the error message if an
error occurred. The
bOverwrite parameter specifies whether to overwrite any
existing files or return an error.