92
CFHTTP
The CFHTTP tag allows you to execute POST and GET operations on files. Using
CFHTTP, you can execute standard GET operations as well as create a query object
from a text file. POST operations allow you to upload MIME file types to a server, or
post cookie, formfield, URL, file, or CGI variables directly to a specified server.
Syntax
<CFHTTP URL="hostname"
PORT="port_number"
METHOD="get_or_post"
USERNAME="username"
PASSWORD="password"
NAME="queryname"
COLUMNS="query_columns"
PATH="path"
FILE="filename"
DELIMITER="character"
TEXTQUALIFIER="character"
RESOLVEURL="Yes/No"
PROXYSERVER="hostname"
PROXYPORT="port_number"
USERAGENT="user_agent"
THROWONERROR="Yes/No"
REDIRECT="Yes/No"
TIMEOUT="timeout_period">
</CFHTTP>
Note
URL
Required. Full URL of the host name or IP address of the server on which the file
resides.
PORT
Optional. The port number on the server from which the object is being
requested. Default is 80. When used with RESOLVEURL, the URLs of retrieved
documents that specify a port number are automatically resolved to preserve links
in the retrieved document.
METHOD
Required. GET or POST. Use GET to download a text or binary file, or to create a
query from the contents of a text file. Use POST to send information to a server
page or a CGI program for processing. POST requires the use of a CFHTTPPARAM
tag.
USERNAME
Optional. When required by a server, a valid username.
Terminate CFHTTP POST operations with </CFHTTP>. Termination is
not required with CFHTTP GET operations.
CFML Language Reference
Need help?
Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?
Questions and answers