You literally create an Object, with header names as the property names
and header values as property values.
 
var headers:Object = new Object();
headers["CustomHeaderA"] = "SomeValue";
headers["CustomHeaderB"] = "SomeValue";
 
Note that if you're not using the FDS Proxy (i.e. the default state for
HTTPService is useProxy="false"), your request will ultimately make use
of the Flash Player API URLRequestHeader, which has some restrictions on
the headers that can be set. See this ASDoc page:
 
http://livedocs.macromedia.com/flex/2/langref/flash/net/URLRequestHeader
.html
 
 


________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of mrinal.wadhwa
Sent: Saturday, December 02, 2006 11:24 PM
To: [email protected]
Subject: [flexcoders] HTTPService GET request headers



Hi all,

This may be too simple a question but I'm new and can't seem to find
an answer, please help ....

How do I set a header in a HTTP GET request? The documentation says
that HTTPService takes an Object in the "headers" property ... what
should this Object look like ... a String?? 

A simple example would be of enormous help ... thanking everyone in
advance.

With regards,
Mrinal



 

Reply via email to