
702
DEVELOPING
COLDFUSION 9 APPLICATIONS
Flex and AIR Integration in ColdFusion
Las
t
upda
te
d 8/5/2010
Using the CF.http Get method
You use the
Get
method to retrieve files, including text and binary files, from a specified server. You reference
properties of the object returned by the
CF.http
function to access things like file content, header information, MIME
type, and so on.
The following example uses the
CF.http
function to show a common approach to retrieving data from the web:
// Returns content of URL defined in url variable
// This example uses positional argument style
function get()
{
url = "http://www.adobe.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
CF.http
function properties, see CF.http in the
CFML Reference
.
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...