Contents > Developing ColdFusion MX Applications > Using Server-Side ActionScript > Using the CF.http function PreviousNext

Using the CF.http function

The CF.http function returns an object that contains properties, also known as attributes. You reference these attributes to access the contents of the file returned, header information, HTTP status codes, and so on. The following table shows the available properties:

Property

Description

Text

A Boolean value indicating whether the specified URL location contains text data.

Charset

The charset used by the document specified in the URL.

HTTP servers normally provide this information, or the charset is specified in the charset parameter of the Content-Type header field of the HTTP protocol. For example, the following HTTP header announces that the character encoding is EUC-JP:

Content-Type: text/html; charset=EUC-JP

Header

Raw response header. For example, macromedia.com returns the following header :

HTTP/1.1 200 OK

Date: Mon, 04 Mar 2002 17:27:44 GMT

Server: Apache/1.3.22 (Unix) mod_perl/1.26

Set-Cookie: MM_cookie=207.22.48.162.4731015262864476;

path=/; expires=Wed, 03-Mar-04 17:27:44 GMT;

domain=.macromedia.com

Connection: close

Content-Type: text/html

Filecontent

File contents, for text and MIME files.

Mimetype

MIME type. Examples of MIME types include text/html, image/png, image/gif, video/mpeg, text/css, and audio/basic.

responseHeader

Response header. If there is one instance of a header key, this value can be accessed as a simple type. If there is more than one instance, values are put in an array in the responseHeader structure.

Statuscode

HTTP error code and associated error string. Common HTTP status codes returned in the response header include the following:

400: Bad Request

401: Unauthorized

403: Forbidden

404: Not Found

405: Method Not Allowed


Contents > Developing ColdFusion MX Applications > Using Server-Side ActionScript > Using the CF.http function PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.