You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@wink.apache.org by Brian Laskey <br...@gmail.com> on 2015/05/13 16:14:00 UTC

How does Wink client handle Set-Cookie response headers?

Let's say I am using Wink Client library to connect to a REST service that
provides a response from the app server that contains some specific
app-server related Set-Cookie values in the Response header.

I can manually extract the headers from the Response and iterate over the
headers until I find Set-Cookie, then parse the cookie names and values
from that, e.g. JSESSIONID

To make subsequent requests I would create a new Resource and set the
cookies there.

I have found this works, but I would like to know if there is any built in
handling for this kind of scenario. Yes I know that REST APIs should be
stateless, in my case I am working with one that is optimized if you reuse
certain session state.

Thanks,
Brian