on 2011 Oct 24 3:44 PM
I have a question similar to "how to retrieve cookies" (http://sqlanywhere-forum.sap.com/questions/5256/how-to-retrieve-cookie-from-web-service) but in my case I have to deal with multiple cookies.
When i try this example, it sort of works, but the cookie is only the last cookie pair in the response. Here's the cookie info it shows in the query result (attribute,value): 'Set-Cookie','BIGServer-8080=123432138.36895.0000; path=/'
But in Mozilla I can inspect the cookie that gets returned, and it has 11 sets of cookies in the Cookie result. (eg, something like this. values have been changed, shortened to protect privacy): LogoURL=www.blah.com; BlahTicket=12341341234123%7C41ee026bc0000000%7C41df3c04d7800000%7C; BlahUser=blaha%7C41ee026bc0000000%7C41df3c04d7800000%7C; BIGServer-8080=123432138.36895.0000;
How can I get all the other cookie pairs? I'm using Sqlanywhere 10.0.1 build 4135. Thanks,
Your web request returns the cookie information in its headers. If you look at my answer to the question you will see that the code retrieves the cookie value by looking at the 'set-cookie' header that is returned from the call to the web service. If more than one cookie is being returned then one of two different scenarios can occur:
sa_split_list( attribute, ';' )
) and then extract the cookie value out of each piece.Also please remember that your browser will remember (cache) cookies from one web service call to the next. This can be important to keep in mind if the web service(s) that you are using is(are) setting one cookie per web service call and you are making multiple calls and hence getting multiple cookies - i.e. since your browser caches the cookies you will get the list of all cookies that you have been given during your session (or longer).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
11 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.