<cfhttpparam>
Required for <cfhttp> POST operations, <cfhttpparam> is used to specify the parameters necessary to a cfhttp POST.
This tag cannot have a body.
This tag is also supported within <cfscript>
<cfhttpparam
name=string
type=body|CGI|cookie|file|form|formfield|header|URL|XML
value=any
file=string
encoded=boolean
mimetype=string
>
| Attribute | Description | Default |
|---|---|---|
name
string, optional
|
edit
A variable name for the data being passed. |
|
type
string, optional
|
edit
valid values are:
|
URL |
value
any, optional
|
edit
Specifies the value of the URL, FormField, Cookie, File, or CGI variable being passed. |
|
file
string, optional
|
edit
Required for type = |
|
encoded
boolean, optional
|
edit
Applies to type Specifies whether to URL encode the values defined with the tag, but only if necessary (no double encoding). |
|
mimetype
string, optional
|
edit
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, |
Examples
editSimple Example
<cfhttpparam name="test_file", type="file", file="filepath/file.ext">
<cfscript>
//Script format
cfhttpparam(name="test_file", type="file", file="filepath/file.ext");
</cfscript>
See also
- <cfhttp>
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)