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

Update serialize to accept a object of key/values. #30

Closed
jgornick opened this issue Mar 27, 2015 · 8 comments
Closed

Update serialize to accept a object of key/values. #30

jgornick opened this issue Mar 27, 2015 · 8 comments
Labels

Comments

@jgornick
Copy link

The serialize method should be updated to accept an object of key/values and serialize to a cookie string. This would make the serialize/parse methods complement each other.

@jgornick jgornick changed the title Update serialize to accept a parsed cookie. Update serialize to accept a object of key/values. Mar 27, 2015
@defunctzombie
Copy link
Contributor

I could agree with that. PR would be appreciated.

@jgornick

This comment has been minimized.

@dougwilson

This comment has been minimized.

@jgornick

This comment has been minimized.

@gurupras

This comment has been minimized.

@dougwilson

This comment has been minimized.

@export-mike
Copy link

I have wanted this feature recently and updated it to create a new PR against the current state of the main branch.

#119

@dougwilson dougwilson removed this from the 1.0 milestone Mar 30, 2022
@blakeembrey
Copy link
Member

Closing this out for now, but if there's interest I could see a new method being added for this functionality. It doesn't make a lot of sense to alter the existing serialize signature because it's producing a Set-Cookie, but I can imagine two different approaches:

  1. Wanting an object to format into a Cookie header (this is different to Set-Cookie).
  2. Wanting an object + options to format into multiple Set-Cookie headers, i.e. an array.

If someone has strong feelings on how it should work and what it's solving for you, feel free to open a new issue.

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

Successfully merging a pull request may close this issue.

6 participants