Related to How can I replicate this cookie functionality on my Web Client?
I discovered in a previous question that I need to set a cookie in my request header.
I call a login method on a 3rd party web service, this returns a cookie that I need to use on subsequent requests to that server. I had assumed that the browser keeps this cookie and attaches it to the appropriate request, however, this does not seem to be the case (I can see it isn't in firebug).
How can I set the cookie on my request header?
My call is as follows:
var call = serviceUriString + '?' + strRequest;
$.post(call, function(d) {}, 'text').success(function(d) { ..//do something
I think I may have to use jQuery.ajax( url [, settings] ) beforesend, but I can't find any good examples of how to set the cookie, or indeed how to get it out / persist it from the response from the previous login request (so that I can then attach it).
As @edr points out, I am doing this client side. So my website calls a web service in client side code.