User Guide

Table Of Contents
112 Chapter 6: Using Flash Remoting with ColdFusion MX
"http://localhost/flashservices/gateway",
null,
"httpFuncs",
null,
null);
// call service method - basicGet()
var pc:PendingCall = myHttpService.basicGet("http://examples.macromedia.com/
flashservices/gateway");
// specify result and fault handler functions
pc.responder = new RelayResponder(this, "basicGet_Result", "basicGet_Fault");
// display returned result
function basicGet_Result(result:ResultEvent):Void
{
myDisplayScreen.text = result.result;
}
The CF.http() function returns an object that contains properties (also known as attributes) that
you reference to access the contents of the file returned, header information, HTTP status codes,
and so on. The following table shows the properties available:
Property Description
Text A Boolean value that indicates whether the specified URL location contains text
data.
Charset The character set used by the document specified in the URL.
HTTP servers normally provide this information, or the character set is specified
in the
charset parameter of the Content-Type header field of the HTTP protocol.
For example, the following HTTP header specifies that the character encoding is
EUC-JP:
Content-Type: text/html; charset=EUC-JP
Header Raw response header. For example, macromedia.com returns a header similar to
this one:
HTTP/1.1 200 OK
Date: Mon, 04 Mar 2002 17:27:44 GMT
Server: Apache/1.3.22 (Unix) mod_perl/1.26
Set-Cookie: MM_cookie=207.22.48.162.4731015262864476;
path=/; expires=Wed, 03-Mar-04 17:27:44 GMT;
domain=.macromedia.com
Connection: close
Content-Type: text/html
Filecontent File contents, for text and MIME files.
Mimetype MIME type. Examples of MIME types include text/html, image/png, image/gif,
video/mpeg, text/css, and audio/basic.