@ddeboer mentioned that cookie handling should be possible from adapters.
In the Ivory adapter it was possible by using event dispatcher. I checked the Ivory and the Guzzle CookieJar implementation and they are really similar.
There are two ways to implement cookie handling:
- If the underlying client supports it pass a cookie option
- Force the use of an Event adapter which wraps the underlying adapter
Option 2 would be the general solution because not all clients might support cookies. Ultimately the underlying client (like guzzle) would do the same: serialize the cookie jar and place it in the request header.
@ddeboer mentioned that cookie handling should be possible from adapters.
In the Ivory adapter it was possible by using event dispatcher. I checked the Ivory and the Guzzle CookieJar implementation and they are really similar.
There are two ways to implement cookie handling:
Option 2 would be the general solution because not all clients might support cookies. Ultimately the underlying client (like guzzle) would do the same: serialize the cookie jar and place it in the request header.