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.
Содержание ColdFusion Server 5
Страница 18: ...xviii About This Book...
Страница 26: ...8 Chapter 1 Setting Up the Product...
Страница 42: ...24 Chapter 2 Configuring Browsers and Servers...
Страница 60: ...42 Chapter 3 Exploring the Workspace...
Страница 100: ...82 Chapter 6 Editing Pages...
Страница 126: ...108 Chapter 7 Using Web Development Languages...
Страница 212: ...194 Chapter 13 Customizing the Development Environment...
Страница 320: ...302 Glossary...