218
Chapter 2: ColdFusion Tags
The following attributes tell ColdFusion to convert the HTTP response body into a ColdFusion
query object. They can be used with the GET and POST methods only.
Usage
The
cfhttp
tag is a general-purpose tool for creating HTTP requests and handling the returned
results. It enables you to generate most standard HTTP request types. You use embedded
cfhttpparam
tags to specify request headers and body content.
Attribute
Req/Opt Default
Description
name
Opt
Tells ColdFusion to create a query object with the given
name from the returned HTTP response body.
columns
Opt
First row of
response
contains
column
names.
The column names for the query, separated by commas,
with no spaces. Column names must start with a letter. The
remaining characters can be letters, numbers, or
underscore characters (_).
If there are no column name headers in the response,
specify this attribute to identify the column names.
If you specify this attribute, and the
firstrowasHeader
attribute is True (the default), the column names specified
by this attribute replace the first line of the response. You
can use this behavior to replace the column names retrieved
by the request with your own names.
If a duplicate column heading is encountered in either this
attribute or in the column names from the response,
ColdFusion appends an underscore to the name to make it
unique.
If the number of columns specified by this attribute does not
equal the number of columns in the HTTP response body,
ColdFusion generates an error.
firstrowas
headers
Opt
yes
Determines how ColdFusion processes the first row of the
query record set:
•
yes: processes the first row as column heads. If you
specify a
columns
attribute, ColdFusion ignores the first
row of the file.
•
no: processes the first row as data. If you do not specify a
columns
attribute, ColdFusion generates column names
by appending numbers to the word "column"; for example,
"column_1".
delimiter
Opt
, [comma]
A character that separates query columns. The response
body must use this character to separate the query
columns.
textQualifier
Opt
" [double-
quotation
mark]
A character that, optionally, specifies the start and end of a
text column. This character must surround any text fields in
the response body that contain the delimiter character as
part of the field value.
To include this character in column text, escape it by using
two characters in place of one. For example, if the qualifier
is a double-quotation mark, escape it as
""
.
Summary of Contents for COLFUSION MX 7 - INSTALLING AND USING COLDFUSION MX
Page 1: ...COLDFUSION MX7 CFML Reference...
Page 20: ...20 Chapter 1 Reserved Words and Variables...
Page 50: ...50 Chapter 2 ColdFusion Tags cfelse br Searching cfif cfloop cfif...
Page 101: ...cfdefaultcase 101 cfdefaultcase cfswitch cfoutput Your grade is grade cfoutput...
Page 115: ...cfdocumentsection 115 cfdocumentsection cfoutput cfdocument...
Page 411: ...cftable 411 cftable body html...
Page 515: ...Chr 515 maxlength 5 p input type Submit name input type RESET cfform...
Page 605: ...GetEncoding 605 WriteOutput The encoding is theEncoding cfscript cfif...
Page 629: ...GetProfileString 629 tr td input type Submit name Submit value Submit td td td tr table form...
Page 655: ...IIf 655 cfoutput IIf Hour Now GTE 12 DE It is afternoon or evening DE It is morning cfoutput b...
Page 664: ...664 Chapter 3 ColdFusion Functions cfelse h3 Conversion error h3 cfif...
Page 687: ...IsStruct 687 cfoutput cfquery cfif cfoutput hr Employee Add Complete cfoutput cfcase cfswitch...
Page 751: ...LSDateFormat 751 hr noshade cfoutput cfloop...
Page 861: ...StructFind 861 cfquery cfif cfoutput hr Employee Add Complete cfoutput cfcase cfswitch...
Page 903: ...Val 903 value Is the beginning numeric name form...
Page 932: ...932 Chapter 3 ColdFusion Functions...
Page 944: ...944 Chapter 4 ColdFusion MX Flash Form Style Reference...
Page 962: ...962 Chapter 5 Application CFC Reference...
Page 1054: ...1054 Chapter 6 ColdFusion MX Event Gateway Reference...