03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Methods inherited from class Object<br />

addProperty (Object.addProperty method), hasOwnProperty<br />

(Object.hasOwnProperty method), isPropertyEnumerable<br />

(Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf<br />

method), registerClass (Object.registerClass method), toString<br />

(Object.toString method), unwatch (Object.unwatch method), valueOf<br />

(Object.valueOf method), watch (Object.watch method)<br />

addRequestHeader (XML.addRequestHeader<br />

method)<br />

public addRequestHeader(header:Object, headerValue:String) : Void<br />

Adds or changes HTTP request headers (such as Content-Type or SOAPAction) sent with<br />

POST actions. In the first usage, you pass two strings to the method: header <strong>and</strong><br />

headerValue. In the second usage, you pass an array of strings, alternating header names <strong>and</strong><br />

header values.<br />

If multiple calls are made to set the same header name, each successive value replaces the value<br />

set in the previous call.<br />

You cannot add or change the following st<strong>and</strong>ard HTTP headers using this method: Accept-<br />

Ranges, Age, Allow, Allowed, Connection, Content-Length, Content-Location,<br />

Content-Range, ETag, Host, Last-Modified, Locations, Max-Forwards, Proxy-<br />

Authenticate, Proxy-Authorization, Public, Range, Retry-After, Server, TE,<br />

Trailer, Transfer-Encoding, Upgrade, URI, Vary, Via, Warning, <strong>and</strong> WWW-Authenticate.<br />

Parameters<br />

header:Object - A string that represents an HTTP request header name.<br />

headerValue:String - A string that represents the value associated with header.<br />

Example<br />

The following example adds a custom HTTP header named SOAPAction with a value of Foo<br />

to an XML object named my_xml:<br />

my_xml.addRequestHeader("SOAPAction", "'Foo'");<br />

The following example creates an array named headers that contains two alternating HTTP<br />

headers <strong>and</strong> their associated values. The array is passed as a parameter to the<br />

addRequestHeader() method.<br />

var headers:Array = new Array("Content-Type", "text/plain",<br />

"X-ClientAppVersion", "2.0");<br />

my_xml.addRequestHeader(headers);<br />

XML 679

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!