Using Flash Remoting with server-side ActionScript
113
The arguments in the following table can be passed only as an array of objects in the
params
argument of the
CF.http()
function:
You can write the
CF.http()
function using either named arguments or positional arguments.
The positional argument style supports a subset of
CF.http
arguments, although the named
argument style is more readable than the positional argument style.
The
CF.http()
function accepts the following arguments using the named argument style:
CF.http
({
method:"get or post",
url:"URL",
username:"username",
password:"password",
resolveurl:"yes or no",
params:arrayvar,
path:"path",
file:"filename"
})
In the named argument style, braces surround the function arguments.
The positional argument approach supports a subset of
CF.http
arguments, but it lets you code
in a more succinct and efficient style. The schema for the positional argument style is as follows:
CF.http(url);
CF.http(method, url);
CF.http(method, url, username, password);
CF.http(method, url, params, username, password);
Responseheader Response header. If there is one instance of a header key, you can access the
value as a simple type. If there is more than one instance, values are put in an
array in the
responseHeader
structure.
Statuscode
HTTP error code and associated error string, which returns the following HTTP
status codes:
400: Bad Request
401: Unauthorized
403: Forbidden
404: Not Found
405: Method Not Allowed
Argument
Description
name
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
Property
Description