Using The Cf.http Get Method - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

For example, when you build an HTML form using the
the page to which form data is passed. You use the
similar way. However, with the
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");
}

Using the CF.http Get method

You use the
Get
You reference properties of the object returned by the
content, header information, MIME type, and so on.
The following example uses the
from the web:
// Returns content of URL defined in url variable
// This example uses positional argument style
function get()
{
url = "http://www.macromedia.com/software/coldfusion/";
//Invoke with just the url argument. Get is the default.
result = CF.http(url);
return result.get("Filecontent");
}
For more information about
666
Chapter 30: Using Server-Side ActionScript
CF.http
method to retrieve files, including text and binary files, from a specified server.
CF.http
CF.http
Post
method in the
Post
function, the page that receives the Post does not display
CF.http
function to show a common approach to retrieving data
function properties, see
method, you specify the name of
function in a
CF.http
function to access things like file
in CFML Reference.
CF.http

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents