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

Cookie/Response/Request could use some functional setters #38

Closed
rgrinberg opened this issue Oct 16, 2013 · 4 comments
Closed

Cookie/Response/Request could use some functional setters #38

rgrinberg opened this issue Oct 16, 2013 · 4 comments

Comments

@rgrinberg
Copy link
Member

For example updating the expiration of Set_cookie_hdr.t value is not easy. I have similar annoyances with Request/Response and headers. Easiest way to fix this is to add the fieldslib dependency and with fields to the types. Or just add the boilerplate if a new dependency is a no-no.

@avsm
Copy link
Member

avsm commented Oct 16, 2013

I've been playing with avsm/ocaml-lens to see if those are better getter/setters instead of fieldslib. But yes, this is a good point. Fieldslib isn't a bad solution either.

@avsm avsm closed this as completed in b9cf06f Nov 27, 2013
@avsm
Copy link
Member

avsm commented Nov 27, 2013

It's no longer abstract in the interface in 0.9.12, since there are no invariants protected by the creation function.

@avsm
Copy link
Member

avsm commented Nov 28, 2013

I changed my mind and exposed a bunch of fieldslib implementations of request/response and cookie in 0.9.12

@rgrinberg
Copy link
Member Author

Thanks, this is deal. Now updating a cookie within a request is much easier.

@avsm avsm modified the milestone: 1.0 Stable API Nov 9, 2014
mseri pushed a commit to mseri/ocaml-cohttp that referenced this issue Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants