User Guide

cfhttp 177
throwOnError Opt No Yes if the server returns an error response code,
throws an exception that can be caught using the
cftry
and
cfcatch or ColdFusion error pages.
No does not throw an exception if an error response is
returned. In this case, your application can use the
cfhttp.StatusCode variable to determine if there was an
error and its cause.
redirect Opt Yes If the response header includes a Location field,
determines whether to redirect execution to the URL
specified in the field.
Yes redirects execution to the specified page.
No stops execution and returns the response
information in the
cfhttp variable, or throws an error if
the
throwOnError attribute is True.
The
cfhttp.responseHeader.Location variable contains
the redirection path. ColdFusion follows a maximum of
four redirects on a request. If there are more, ColdFusion
functions as if r
edirect ="no".
timeout Opt Value, in seconds of the maximum time the request can
take. If the timeout passes without a response, ColdFusion
considers the request to have failed.
If the client specifies a timeout in the URL search
parameter (for example, ?RequestTime=120) ColdFusion
uses the lesser of the URL timeout and the
timeout
attribute value;
this ensures that the request times out
before, or at the same time as, the page.
If the URL does not specify a timeout, ColdFusion uses the
lesser of the Administrator timeout and the
timeout
attribute value.
If the timeout is not set in any of these, ColdFusion waits
indefinitely for the
cfhttp request to process.
getAsBinary Opt No No If ColdFusion does not recognize the response
body type as text, convert it to a ColdFusion object.
Auto If ColdFusion does not recognize the response
body type as text, convert it to ColdFusion Binary type
data.
Yes Always convert the response body content into
ColdFusion Binary type data, even if ColdFusion
recognizes the response body type as text.
ColdFusion recognizes the response body as text if:
the header does not specify a content type
the content type starts with "text"
the content type starts with "message"
the content type is "application/octet-stream"
If ColdFusion does not recognize the body as text and
converts it to an object, but the body consists of text, the
cfoutput tag can display it. The cfoutput tag cannot
display Binary type data. (To convert binary data to text,
use the
ToString function.)
Attribute Req/Opt Default Description