![]() |
XMLHttpRequest
Ok, I'm stumped - and maybe someone here will know.
I've written a simple XMLRPC client in javascript, using XMLHttpRequest - and this works, I can contact the server, make an RPC, and get a result back - hurrah. Now my problem comes from trying to pass in a cookie into the request I do Code:
request.setRequestHeader('Cookie','aParam=aValue');I'm not getting an error, the cookies just aren't being passed through to the server. I've tried the ActiveX version of XMLHttpRequest, as well as the new native version in IE7 - both have the same result - I've googled a fair bit but haven't found any answers.... |
Re: XMLHttpRequest
The cookie bug in xmlDOM ignores the first command of setRequestHeader and as far as I know, I used the format as below - not with brackets. Dunno if that makes any difference at all but maybe worth a try?
request.setRequestHeader "Cookie", "aParam=aValue" request.setRequestHeader "Cookie", "aParam=aValue" Aren't you like supposed to use Set-Cookie now anyway? |
Re: XMLHttpRequest
Quote:
And Set-cookie is done on the server side, whereas I'm passing it into an xmlhttprequest. |
Re: XMLHttpRequest
oh yeah doh. i forgot i code in vbscript :()
if i come across anything I'll let you know. |
Re: XMLHttpRequest
That's the precise trouble with all of these niche Client-Side languages!!!
|
Re: XMLHttpRequest
Quote:
|
Re: XMLHttpRequest
They are! They have their own little niches with their own niche users, like yourselves :D OK perhaps going a bit overboard calling Javascript a niche language, but I know of many more Javascript coders than I do VB?
|
Re: XMLHttpRequest
Quote:
|
Re: XMLHttpRequest
Does it have any advantages over JScript?
|
Re: XMLHttpRequest
Quote:
Personally I've never been a big fan of it, since I learnt javascript first, and got exposed to vbscript through a rather nasty project involving web based version control - but as I say, lots of people still use it |
Re: XMLHttpRequest
"Danger, Will Robinson!"
“Warning! Warning! Geeks in immediate vicinity†........ ;) [img]Download Failed (1)[/img]https://www.cableforum.co.uk/images/local/2007/10/9.jpg |
Re: XMLHttpRequest
Without Geeks you'd still be carrying stuff rather than using one of those handy "WHEEL" devices :p
|
Re: XMLHttpRequest
Quote:
btw, I am in charge of 135 geeks, so I know of what I speak..... :D |
Re: XMLHttpRequest
Engineers are just a subclass of geek :p:
|
Re: XMLHttpRequest
Quote:
|
Re: XMLHttpRequest
for those of you that care...
to get around this what I have done is just have the client code add in the cookie, and add in the value as a seperate request header, i.e.: Code:
request.setRequestHeader("Cookie","aParam=aValue");It's a hack, and offends me, but hey, what can you do? |
Re: XMLHttpRequest
You Sold Out!
|
Re: XMLHttpRequest
Quote:
Sometimes I don't even know who I am any more. |
| All times are GMT +1. The time now is 04:52. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
All Posts and Content are Cable Forum