Hi all,
I read in something that came from a response. I got the content-type by using
..getResponseHeader("content-type");
I
want to keep the information about the content type but access very
often just the type itself. That's why I thought it best to keep it as
a HeaderElement: That takes care of properly storing any parameters
(such as charset=...).
so far so good.
Now I want to use this as the content-type header in another message.
if i do
addRequestHeader("content-type", myHeaderElement.toString());
that gives me in the actual message (using firebug to inspect):
Content-Type: name=application/x-www-form-urlencoded, value=null
oops!
How do I get it in a header properly?
How do I get it printing out as a String properly (let's say even if not for
the Header itself) ?
I looked for something like header.addHeaderElement(myHeaderElement) and then
adding that header. No such luck.
I also looked for something like HeaderElement.write(myHeaderElement) or
something like that to mirror HeaderElement.parse ...
Still nothing.
Help appreciated !
Thanks!
Rania
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx