User Guide

174 Chapter 2: ColdFusion Tags
cfhttp
Description
Generates an HTTP request and handles the response from the server.
Category
Forms tags, Internet Protocol tags
Syntax
<cfhttp
url = "server_URL"
port = "port_number"
method = "method_name"
proxyServer = "hostname"
proxyPort = "port_number"
proxyUser = "username"
proxyPassword = "password"
username = "username"
password = "password"
userAgent = "user_agent"
charset = "character encoding"
resolveURL = "yes" or "no"
throwOnError = "yes" or no"
redirect = "yes" or "no"
timeout = "timeout_period"
getasbinary = "yes or no"
multipart = "yes or no"
path = "path"
file = "filename"
name = "queryname"
columns = "query_columns"
firstrowasheaders = "yes" or "no"
delimiter = "character"
textQualifier = "character"
>
cfhttpparam tags [optional for some methods]
</cfhttp>
See also
cfhttpparam, GetHttpRequestData, cfftp, cfldap, cfmail, cfpop, SetEncoding
History
ColdFusion MX 6.1:
Added support for the following methods: HEAD, PUT, DELETE, OPTIONS, TRACE.
Added multipart, getAsBinary, proxyUser, and proxyPassword attributes.
Changed httpparam behavior: All operations can have httpparam tags.
Added cfhttp.errorDetail return variable.
Modified response body content types considered to be text
Changed behavior for multiple headers: multiple headers of the same type are returned in an
array.
Added support for HTTPS proxy tunneling.
Fixed bugs in code and documentation.