Name

cfhttpparam

Synopsis

                  <cfhttp> 
  [<cfhttpparam>]
  ... 
</cfhttp>

Used as a child tag of the cfhttp tag to send data with an HTTP request. Multiple cfhttpparam tags may be used to send multiple values in most cases. At least one cfhttpparam tag is required when method is Post. The cfhttpparam tag is optional for all other HTTP operations.

Attributes

name=" name "

The name of the parameter to pass. Required when type is CGI, Cookie, Formfield, Header, and URL. Ignored when type is Body or XML. When type is File, name specifies the filename to be sent in the request.

type=" type "

The parameter type to pass. Options are:

Body

Body of an HTTP request. Only one cfhttpparam tag with type="Body" can be used per cfhttp request. Additionally, no other cfhttpparam tags with a type of File, Formfield, or XML may be used in the same request when type="Body". Body cannot be used when the method attribute of cfhttp is set to Trace. This option is new in ColdFusion MX 6.1.

CGI

Sends a variable as a URL encoded HTTP header.

Cookie

Cookie data to send as an HTTP header. The value is automatically URL encoded.

File

Sends the contents of the specified file without URL encoding. File may only be used when the cfhttp method attribute is set to Post or Put.

Formfield

Form field to send. By default, ColdFusion URL encodes the form field value. Formfield is only used when the method attribute of cfhttp is set to Get or Post.

Header

Sends a non-URL-encoded HTTP header. This option is new in ColdFusion ...

Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.