Adobe COLDFUSION 9 Manual page 706

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Flex and AIR Integration in ColdFusion
Parameter
Description
name
The variable name for data that is passed
type
Transaction type:
URL
FormField
Cookie
CGI
File
value
Value of URL, FormField, Cookie, File, or CGI variables that are passed
In the following example, the
function postWithParamsAndUser()
{
// Set up the array of Post parameters. These are just like cfhttpparam tags.
params = new Array();
params[1] = {name:"arg2", type:"URL", value:"value2"};
url = "http://localhost:8500/";
// Invoke with the method, url, params, username, and password
result = CF.http("post", url, params, "karl", "salsa");
return result.get("Filecontent");
}
Using the CF.http Post method
You use the
method to send cookie, form field, CGI, URL, and file variables to a specified ColdFusion page or CGI
Post
program for processing. For POST operations, use the
passes data to a specified ColdFusion page or an executable that interprets the variables being sent, and returns data.
For example, when you build an HTML form using the
data is passed. You use the
Post
function, the page that receives the Post does not display anything. See the following example:
function postWithParams()
{
// Set up the array of Post parameters. These are just like cfhttpparam tags.
// This example passes formfield data to a specified URL.
params = new Array();
params[1] = {name:"Formfield1", type:"FormField", value:"George"};
params[2] = [name:"Formfield2", type:"FormField", value:"Brown"};
url = "http://localhost:8500/";
// Invoke CF.http with the method, url, and params
result = CF.http("post", url, params);
return result.get("Filecontent");
}
function passes HTTP
CF.http
params
Post
method in the
function in a similar way. However, with the
CF.http
Last updated 8/5/2010
parameters in an array of objects:
Post
argument for each variable that you post. The
method, you specify the name of the page to which form
701
method
Post
CF.http

Advertisement

Table of Contents
loading

Table of Contents