Httpprovider Object - MACROMEDIA COLDFUSION STUDIO 4.5-USING COLDFUSION STUDIO Use Manual

For windows 95/98/nt4/2000
Table of Contents

Advertisement

228

HTTPProvider Object

The HTTPProvider object is a general purpose HTTP protocol object. It can be used
from VTOM scripts for low-level HTTP operations. The HTTPProvider was introduced
as an alternative to simplified HTTP-related methods such as GetURL method of the
main Application object which is limited in the number of customizable HTTP
parameters. Using HTTPProvider you can initialize specific HTTP provider properties
(e.g. Proxy, ProxyPort, Username, Password etc.) and execute GET, POST and HEAD
HTTP method requests. See the W3C HTTP Specification for detailed information on
many of the properties listed here.
Properties
Agent (OleVariant)
Sets/gets the identification of the client which initiates a request. You can use this
property to identify yourself as a client type or emulate a browser.
AuthorizationRequest (OleVariant; readonly)
The WWW-Authenticate response-header field. This field is included in 401
(unauthorized) response messages. The field value consists of at least one challenge
that indicates the authentication scheme(s) and parameters applicable to the
Request-URI.
ContentLength (Integer; readonly)
The length of the received content stream.
ContentType (OleVariant; readonly)
The MIME content type of the received content stream.
ContentTypePost (OleVariant)
Sets/gets the Content-Type entity-header field indicates the media type of the
Entity-Body sent to the recipient or, in the case of the HEAD method, the media type
that would have been sent had the request been a GET.
Cookie (OleVariant)
Sets/gets the Cookie header element. You can use this property to send a set of client
cookies to the server along the HTTP request.
The following example would send cookies named Customer and Cust_ID to a
ColdFusion application.
function Main ()
{
var app = Application;
var httpPro = app.HTTPProvider;
httpPro.URL
httpPro.Cookie = 'Customer="John_Doe"; $Path="/myapp";Cust_ID="4567";
httpPro.Get();
}
= "http://127.0.0.1/GetCustomerRegistration.cfm";
$Path="/myapp"';

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion studio 4.5

Table of Contents