231
State (TAllaireHTTPProviderState; readonly)
The state of the HTTPProvider object. The enumerated state values are:
0 - httpReady
1 - httpNotConnected
2 - httpConnected (browse)
3 - httpDnsLookup
4 - httpDnsLookupDone
5 - httpWaitingHeader
6 - httpWaitingBody
7 - httpAborting
StatusCode (Integer; readonly)
The HTTP request Status-Code element. This is a 3-digit integer result code of the
attempt to understand and satisfy the request.
URL (OleVariant)
Sets/gets the URL location of the resource on which an HTTP method is to be applied.
Username (OleVariant)
Sets/gets the Web server access username.
Methods
Abort
procedure Abort()
Abort the current HTTP operation.
Get
procedure Get()
Performs an HTTP GET method request. Uses the appropriate properties of the
HTTPProvider object to set HTTP request parameters such as proxy server settings,
username and password etc.
The following example demonstrates a simple GET method against the Allaire home
page:
// Message box constants
var hsOKInfo = 64;
function Main () {
var app = Application;
var httpPro = app.HTTPProvider;
httpPro.URL
= "http://www.allaire.com";
httpPro.Get();
app.MessageBox( httpPro.ReceivedHeaderAsString ,"Received HTTP Header",
hsOKInfo);
app.MessageBox(
"URL='"
+ httpPro.URL + "'\n" +
Need help?
Do you have a question about the COLDFUSION STUDIO 4.5-USING COLDFUSION STUDIO and is the answer not in the manual?
Questions and answers