MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Reference page 119

Cfml language reference
Table of Contents

Advertisement

Chapter 1: ColdFusion Tags
If there is no timeout set on the URL in the browser, no timeout set in the
ColdFusion Administrator, and no timeout set with the TIMEOUT attribute,
ColdFusion processes requests synchronously; thus, ColdFusion waits indefinitely
for the CFHTTP request to process.
Note that you must enable the timeout set in the ColdFusion Administrator in
order for the ColdFusion Administrator timeout and the URL timeout to take
effect. This setting is on the ColdFusion Administrator Server Settings page. Please
refer to Administering ColdFusion Serverfor more information about ColdFusion
settings.
Usage
Note the following:
HTTP GET — A user can specify a URL that points to a text or binary file. The
file will be downloaded and its contents stored in a CF variable or in a file so
that the user can manipulate the data. The internal variable FileContent is
available for text and MIME file types. The MimeType variable is available for all
file manipulations. In addition, Header and ResponseHeader allow you to see
the response headers. These variables can be accessed in the following manner:
#CFHTTP.FileContent#
#CFHTTP.MimeType#
#CFHTTP.Header#
#CFHTTP.ResponseHeader[ http_header_key ]#
The ResponseHeader variable is a CFML structure; the other variables are
strings. See the table at the end of this section for a summary of variables
returned by CFHTTP .
GET file into a query — To download a file in a ColdFusion page so that a query
can be built using the file, the file must be either comma-separated or tab-
delimited. Although risky, text qualification may be omitted. The file will be
parsed and an appropriate query built from it. Columns may be specified in the
attribute list so that the client can override the columns specified in the file.
There is error checking within the tag that prevents a user from either entering
an invalid column name or using an invalid column name that was specified in
the original file. If such an illegal filename is encountered, the illegal characters
are stripped. Such action could produce duplicate column names, so duplicate
columns are renamed and inserted into the query header. The query has all of
the functionality of a standard CFQUERY object.
HTTP POST — CFHTTPPARAM tags can be nested inside a CFHTTP tag in a
POST operation. The browser can be pointed to a URL specifying a CGI
executable or a ColdFusion page. Since multiple CFHTTPPARAM tags can be
nested in one CFHTTP tag, you can construct a multipart/form-data style post.
A file content variable is created and this can be used in a CFOUTPUT. If PATH
and FILE are specified, the data returned from the server is saved to the
specified location.
Authentication — CFHTTP supports Windows NT Basic Authentication for
both GET and POST operations. However, Basic Authentication will not work if
your Web server has enabled Windows NT Challenge/Response (Microsoft IIS).
95

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion 4.5

Table of Contents