cfhttpparam

Overview ColdFusion Open BlueDragon Lucee

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

Attributes

Name Required Type Default Description
cgi No If TYPE=CGI, then this is the name of the CGI field
cookie No If TYPE=COOKIE, then this is the name of the cookie
encoded No Boolean Specifies if form field or header should be encoded. Applies to FormField and CGI types; ignored for all other types.
file No String Applies to File type; ignored for all other types. The absolute path to the file that is sent in the request body.
formfield No If TYPE=FORMFIELD, then this is the name of the field
header No If TYPE=HEADER, then this is the name for the header field
mimetype No String 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.
name No String Variable name for data that is passed. Ignored for Body and XML types. For File type, specifies the filename to send in the request.
type Yes String Information type * Header: The parameter specifies an HTTP header. (ColdFusion does not URL encode the header) * Body: Specifies the body of the HTTP request. (ColdFusion does not URL encode the body contents) * XML: Identifies the request as having a content-type of text/xml. Specifies that the value attribute contains the body of the HTTP request. Used to send XML to the destination URL. CFML does not URL encode the XML data. * CGI: Specifies an HTTP header. CFML URL encodes the header by default. * File: Tells CFML to send the contents of the specified file. CFML does not URL encode the file contents * URL: Specifies a URL query string name-value pair to append to the cfhttp url attribute. CFML URL encodes the query string. * FormField: Specifies a form field to send. CFML URL encodes the Form field by default. * Cookie: Specifies a cookie to send as an HTTP header. CFML URL encodes the cookie.
url No If TYPE=URL, then this is the value for the URL
value No String 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.