Name
CFHTTP
Synopsis
<CFHTTP> [<CFHTTPPARAM>] ... </CFHTTP>
Performs HTTP and HTTPS GET and POST operations on remote web servers.
Attributes
-
METHOD="GET|POST"
Specifies whether
CFHTTP
uses the HTTP GET or POST method. Required.-
URL="
URL
"
The full URL of the remote web page to GET or POST to. If you are trying to resolve a URL that doesn’t end in a filename (such as http://www.myserver.com), and you set the
RESOLVEURL
attribute toYes
, you need to supply a trailing forward slash (http://www.myserver.com/) for this attribute in order for certain URLs (such as those inIMG
tags) to resolve properly. Additionally, a port number may be appended to the URL. (http://www.myserver.com:8080/). If a port number is appended to the URL, it overrides any value set with thePORT
attribute. Required.-
RESOLVEURL="Yes|No"
Yes
causes any partial or relative URLs embedded in the retrieved document to be fully resolved, so that all links in the document remain valid. Optional. The default isNo
.-
REDIRECT="Yes|No"
Whether or not to allow a
CFHTTP
request to be automatically redirected. If set toNo
, theCFHTTP
request fails upon encountering a redirect. If theTHROWONERROR
attribute is set toYes
, an error code and message are written to theCFHTTP.Status_Code
return variable. You can see where a request would have been redirected by referencing theLOCATION
key in theCFHTTP.ResponseHeader
structure. TheCFHTTP
tag can follow up to five redirections per request. If the limit is exceeded, ColdFusion ...
Get Programming ColdFusion 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.