O'Reilly logo

Programming ColdFusion by Rob Brooks-Bilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 to Yes, you need to supply a trailing forward slash (http://www.myserver.com/) for this attribute in order for certain URLs (such as those in IMG 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 the PORT 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 is No.

REDIRECT="Yes|No"

Whether or not to allow a CFHTTP request to be automatically redirected. If set to No, the CFHTTP request fails upon encountering a redirect. If the THROWONERROR attribute is set to Yes, an error code and message are written to the CFHTTP.Status_Code return variable. You can see where a request would have been redirected by referencing the LOCATION key in the CFHTTP.ResponseHeader structure. The CFHTTP tag can follow up to five redirections per request. If the limit is exceeded, ColdFusion ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required