Addrequestheader (Loadvars.addrequestheader Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

addRequestHeader (LoadVars.addRequestHeader
method)
public addRequestHeader(header:Object, headerValue:String) : Void
Adds or changes HTTP request headers (such as
actions. In the first usage, you pass two strings to the method:
POST
. In the second usage, you pass an array of strings, alternating header names and
headerValue
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
,
Content-Range
ETag
,
Authenticate
Proxy-Authorization
,
Trailer
Transfer-Encoding
Availability: ActionScript 1.0; Flash Player 6
Parameters
- A string or array of strings that represents an HTTP request header name.
header:Object
headerValue:String
Example
The following example adds a custom HTTP header named
to the
object:
my_lv
my_lv.addRequestHeader("SOAPAction", "'Foo'");
The following example creates an array named
headers and their associated values. The array is passed as an argument to
addRequestHeader()
var headers = ["Content-Type", "text/plain", "X-ClientAppVersion", "2.0"];
my_lv.addRequestHeader(headers);
The following example creates a new LoadVars object that adds a request header called
. The header contains a variable that can be checked by the server.
FLASH-UUID
var my_lv:LoadVars = new LoadVars();
my_lv.addRequestHeader("FLASH-UUID", "41472");
my_lv.name = "Mort";
my_lv.age = 26;
my_lv.send("http://flash-mx.com/mm/cgivars.cfm", "_blank", "POST");
,
,
,
Allow
Allowed
Connection
,
,
Host
Last-Modified
,
Public
,
,
Upgrade
- A string that represents the value associated with
.
Content-Type
,
Content-Length
,
,
Locations
Max-Forwards
,
,
Range
Retry-After
,
,
,
URI
Vary
Via
Warning
SOAPAction
that contains two alternating HTTP
headers
or
) sent with
SOAPAction
and
header
,
Content-Location
,
Proxy-
,
,
,
Server
TE
, and
WWW-Authenticate
.
header
with a value of
LoadVars
,
.
Foo
695

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF