MACROMEDIA FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE Reference page 90

Server-side actionscript language reference
Table of Contents

Advertisement

LoadVars.addRequestHeader()
Availability
Flash Media Server 2.
Usage
myLoadVars.addRequestHeader(header, headerValue)
Parameters
A string or array of strings that represents an HTTP request header name.
header
A string that represents the value associated with
.
headerValue
header
Returns
Nothing.
Description
Method; adds or changes HTTP request headers (such as Content-Type or SOAPAction) sent
with POST actions. There are two possible use cases for this method: you can pass two
strings,
and
, or you can pass an array of strings, alternating header
header
headerValue
names and header values.
If multiple calls are made to set the same header name, each successive value will replace the
value set in the previous call.
The following standard HTTP headers cannot be added or changed with 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 the
object:
my_lv
my_lv.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 an argument to the
method.
addRequestHeader()
var headers = ["Content-Type", "text/plain", "X-ClientAppVersion", "2.0"];
my_lv.addRequestHeader(headers);
90
Server-Side ActionScript Language Reference

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash media server 2

Table of Contents