HTTPProvider object
295
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.
Содержание HOMESITE
Страница 11: ...Contents xi Table of CommandID values 310 Table of SettingID values 314 Glossary 323...
Страница 12: ...xii Contents...
Страница 20: ...xx About This Book...
Страница 28: ...8 Chapter 1 Setting Up the Product...
Страница 70: ...50 Chapter 4 Managing Files...
Страница 88: ...68 Chapter 5 Writing Code and Web Content...
Страница 116: ...96 Chapter 6 Editing Pages...
Страница 148: ...128 Chapter 7 Using Web Development Languages...
Страница 190: ...170 Chapter 11 Deploying Files...
Страница 210: ...190 Chapter 12 Testing and Maintaining Web Pages...
Страница 216: ...196 Chapter 13 Extending the Help System...
Страница 350: ...330 Glossary...
Страница 358: ...338 Index...