
233
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 = "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
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.
Содержание COLDFUSION STUDIO 4.5-USING COLDFUSION...
Страница 1: ...Allaire Corporation Using ColdFusion Studio ColdFusion Studio 4 5 for Windows 95 98 NT4 2000...
Страница 16: ...xvi Contacting Allaire...
Страница 90: ...82...
Страница 130: ...122...
Страница 133: ...141 Two VTML tags CAT and E let you customize the content of these dialog boxes...
Страница 182: ...190...