User Guide
cfhttp 217
The following attribute is used with the PUT method to determine how to send data specified
with
httpparam type="formField":
The following attribute allows you to specify the name of the variable in which you would like the
results of the operation returned. The name you specify replaces
cfhttp as the prefix by which
you access the returned variables. For example, if you set the
result attribute to myResult, you
would access
FileContent as #myResult.FileContent#.
The
result attribute allows functions or CFCs that are called from multiple pages at the same
time to avoid overwriting the results of one call with another
. For information about the variables
returned by a
cfhttp get operation, see “Variables returned by a cfhttp get operation” in the
Usage section.
The following attributes tell ColdFusion to put the HTTP response body in a file. You can put
the response body in a file for GET, POST, PUT, DELETE, OPTIONS, and TRACE methods,
but it is generally not useful with the DELETE or OPTIONS method.
Attribute Req/Opt Default Description
multipart Optional no
(Sends as
multipart
only if
request
includes File
type data.)
Tells ColdFusion to send all data specified by
cfhttpparam
type="formField"
tags as multipart form data, with a
Content-Type of multipart/form-data. By default,
ColdFusion sends cfhttp requests that contain only
formField data with a Content Type of application/x-www-
form-urlencoded. (If the request also includes File type
data, ColdFusion uses the multipart/form-data content type
for all parts.)
If yes, ColdFusion also sends the request’s charset in each
Content-Type description. All form field data must be
encoded in this character encoding, and ColdFusion does
not URLEncode the data. (The field name must be in ISO-
88591-1 or ASCII.) Some http parsers, including the one
used by previous versions of ColdFusion, ignore the
multipart form field character encoding description.
Attribute Req/Opt Default Description
result Optional Specifies the name of the variable in which you want the
result returned.
Attribute Req/Opt Default Description
path Required
if
file is
specified.
Tells ColdFusion to save the HTTP response body in a file.
Contains the absolute path to the directory in which to store
the file.
file Required
if
path is
specified
and not a
GET
method
See
Description
Name of the file in which to store the response body.
For a GET operation, the default is the file requested in the
URL, if there is one. For example, if the URL in a GET
method is http:www.myco.com/test.htm, the default file is
test.htm.
Do not specify the path to the directory in this attribute; use
the
path attribute.