XML class
171
Description
Method; adds or changes HTTP request headers (such as
Content-Type
or
SOAPAction
) sent
with
POST
actions. In the first usage, you pass two strings,
headerName
and
headerValue
, to
the method. In the second usage, you pass an array of strings, alternating header names, and
header values.
If multiple calls are made to set the same header name, each successive value replaces the value
set in the previous call.
You cannot add or change the following standard HTTP headers using this method:
Accept-Ranges
,
Age
,
Allow
,
Allowed
,
Connection
,
Content-Length
,
Content-Location
,
Content-Range
,
ETag
,
Host
,
Last-Modified
,
Locations
,
Max-Forwards
,
Proxy-Authenticate
,
Proxy-Authorization
,
Public
,
Range
,
Retry-After
,
Server
,
TE
,
Trailer
,
Transfer-Encoding
,
Upgrade
,
URI
,
Vary
,
Via
,
Warning
, and
WWW-Authenticate
.
Example
The following example adds a custom HTTP header named
SOAPAction
with a value of
Foo
to an XML object named
my_xml
:
my_xml.addRequestHeader("SOAPAction", "'Foo'");
The following example creates an array named
headers
that contains two alternating HTTP
headers and their associated values. The array is passed as a parameter to the
addRequestHeader()
method.
var headers = new Array("Content-Type", "text/plain",
"X-ClientAppVersion", "2.0");
my_xml.addRequestHeader(headers);
XML.appendChild()
Availability
Flash Media Server 2.
Usage
my_xml
.appendChild(
childNode
)
Parameters
childNode
An XMLNode object that represents the node to be moved from its current
location to the child list of the
my_xml
object.
Returns
Nothing.