cfhttpparam

Allowed inside cfhttp tag bodies only. Required for cfhttp POST
operations. Optional for all others. Specifies parameters to
build an HTTP request.

 <cfhttpparam type="header">

 cfhttpparam(type="header");

Attribute Reference for the cfhttpparam tag

type

Required: Yes
The type of data to send

header: Specifies an HTTP header. Does not URL encode the value

body: Specifies that the value is the body of the HTTP request.

xml: Identifies the request as having a content-type of
text/xml and specifies that the value attribute contains the body of the HTTP request.

cgi: Same as header but URL encodes the value by default.

file: Tells CFML to send the contents of the specified file.

url: Specifies a URL query string name-value pair to append to the cfhttp url attribute. URL encodes the value.

formfield: Specifies a form field to send. URL encodes the value by default.

cookie: Specifies a cookie to send as an HTTP header. URL encodes the value. Values:
  • header
  • body
  • xml
  • cgi
  • file
  • url
  • formfield
  • cookie

name

Required: No
Variable name for data that is passed. Ignored for body and xml type. For file type, specifies the filename.

value

Required: No
Value of the data that is sent. Ignored for file type. The value must contain string data or data that CFML can convert to a string for all type attributes except Body. Body types can have string or binary values.

file

Required: No
Applies to file type; ignored for all other types. The absolute path to the file that is sent with the request.

encoded

Required: No
Applies to formfield and cgi types; ignored for all other
types. Specifies whether to URLEncode the form field or
header.

mimetype

Required: No
Applies to file type; invalid for all other types.
Specifies the MIME media type of the file contents.
The content type can include an identifier for the
character encoding of the file; for example, text/html;
charset=ISO-8859-1 indicates that the file is HTML text in
the ISO Latin-1 character encoding. Values:
  • text/plain
  • text/html


Fork me on GitHub