03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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 />

The following request headers cannot be used, <strong>and</strong> the restricted terms are not case-sensitive<br />

(for example, Get, get, <strong>and</strong> GET are all not allowed):<br />

Accept-Charset, Accept-Encoding, Accept-Ranges, Age, Allow, Allowed, Connection,<br />

Content-Length, Content-Location, Content-Range, Date, Delete, ETag, Expect, Get,<br />

Host, Keep-Alive, Last-Modified, Location, Max-Forwards, Options, Post, Proxy-<br />

Authenticate, Proxy-Authorization, Public, Put, Range, Referer, Retry-After,<br />

Server, TE, Trace, Trailer, Transfer-Encoding, Upgrade, URI, User-Agent, Vary, Via,<br />

Warning, WWW-Authenticate, x-flash-version.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 6<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 />

1310 <strong>ActionScript</strong> classes

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

Saved successfully!

Ooh no, something went wrong!