Post
procedure Post()
Performs an HTTP POST method request. The following example 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
var CustomerID
= "John Doe";
var ProductID
= "3456";
var DateSold
= "10/10/99";
var PostStream =
httpPro.SendStreamAsString = PostStream; httpPro.Post();
var sOutput = httpPro.ReceivedStreamAsString;
app.activeDocument.Text = sOutput;
}
PostAsync
procedure PostAsync()
Performs an HTTP POST method request asynchronously.
SaveReceivedStreamToFile
procedure SaveReceivedStreamToFile(FilePath: OleVariant; bOverwrite: wordbool):
OleVariant
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.
The following are predefined error messages. Check for the error strings to detect these
error cases:
File already exits — returned when file specified in FilePath exists and bOverwrite is set
to false.
Path does not exist — Returned when the path specified in FilePath does not exist.
= "http://127.0.0.1/httptest.cfm";
'Customer_ID='
'&ProductNumber='
'&SaleDate='
+ httpPro.URLEncode( CustomerID ) +
+ httpPro.URLEncode( ProductID ) +
+ httpPro.URLEncode( DateSold );
233
Need help?
Do you have a question about the COLDFUSION STUDIO 4.5-USING COLDFUSION STUDIO and is the answer not in the manual?