July 31, 2003
addRequestHeader

Browsing through the appendix of Colin Moock's excellent ASDG2 I noticed a new command addRequestHeader() that was added with the release of the Flash Player 6.0.65.0. As Macromedia only mentioned this once in their release notes, it looks like this command has already been forgotten again. At least I get that impression looking at those 5 results Google returns me: here, here or here.

So as a little reminder and for further reference here's what addRequestHeader is good for, right from the source:

Customization of HTTP headers
The XML and LoadVars objects can both generate POST actions. Each of these classes have new methods to allow authors to specify custom values for HTTP headers for the POST action: addRequestHeader (<header name>, <header value>), and addRequestHeader (<headers>). In the first case, multiple calls are supported. If multiple calls are made to set the same header name, each successive value will replace the value set in the previous call. In the second case, <headers> is an array of strings, alternating header names and header values. The array will be parsed out as if it were a series of calls to the simpler form of the method, and the same rules will be applied to multiple uses of a header name.

myXML.addRequestHeader("SOAPAction", "\"Foo\"");

var headers = ["Content-Type", "text/plain", "X-ClientAppVersion", "2.0"];
myXML.addRequestHeader(headers);

Posted at July 31, 2003 06:55 PM | Further reading
Comments

Does that mean that it`s now possible to send a soap request from flash without remoting? That would be the solution to all my problems right now!

Posted by: benz on August 15, 2003 02:23 AM
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?



Thank you!

Most Visited Entries
Sketches, Works & Source Code
Lectures
Contact
Backlog
In Love with
Powered by
Movable Type 2.661

© Copyright Mario Klingemann

Syndicate this site:
RSS 1.0 - RSS 2.0

Quasimondo @ flickr
Quasimondo @ LinkedIn
Quasimondo @ Twitter
Quasimondo @ Facebook
Quasimondo @ MySpace
Quasimondo is a Bright
Citizen of the TRansnational Republic
My other blog in german
Impressum


My family name is written Klingemann,
not Klingelmann, Klingeman, Klingaman, Kingemann,
Kindermann, Killingaman, Klingman, Klingmann, Klingonman
Klingemman, Cleangerman, Klingerman or Kleangerman

profile for Quasimondo at Stack Overflow, Q&A for professional and enthusiast programmers