Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add cookie management #6

Open
poef opened this issue Jul 4, 2014 · 1 comment
Open

add cookie management #6

poef opened this issue Jul 4, 2014 · 1 comment
Labels

Comments

@poef
Copy link
Contributor

poef commented Jul 4, 2014

It should be easy to add / update / delete cookies
In addition if a request returns a cookie, the client should remember the cookie for following requests to the same host ( depending on the path and other info in the cookie )

@poef
Copy link
Contributor Author

poef commented Jul 4, 2014

You can set cookies through the options array, as a stream_context, but userfriendly it isn't. I think it would be best if we had a special cookie controller that you could access per client:

$client->cookies->add(...)
$client->cookies->ls()

But it might be even better to have a faux array for cookies:

$client->cookies[] = \arc\http::cookie( ... );

This might lead to problems because there is a difference between cookies set in the client ( browser ) and cookies send/received for any specific request.

So perhaps we need to wrap the requestHeaders and responseHeaders and let them handle cookies through a simple API as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant