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.

For more information about CF.http function properties, see Chapter 5, "ColdFusion ActionScript Functions".

Example using the Get method

The following example of using the CF.http function shows 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.macromedia.com/software/coldfusion/";

  //Invoke with just the url argument. Get is the default.
  result = CF.http(url);
  return result.get("Filecontent");
}

Comments