-
-
Notifications
You must be signed in to change notification settings - Fork 440
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
[Suggestion] Create "Cookie Middleware", obsolete req.cookie()
and c.cookie()
#965
Comments
I think it may be better to make it "deprecated" at v3 and show the warning messages, and then "obsolete" at v4. |
Just curious why you think this. As a cookie user, I'm not clear on why I'd use cookies less with Hono than with any other tool. |
What I meant was that using cookies is not as frequent as using 'c.req.query' or 'c.req.param'. Therefore, we decided to make them obsolete because reducing the bundle size is important for Hono. |
I hope I'm misunderstanding you saying "obsolete" and that Hono intends to still support cookies (even if from a separate package). I'm starting to port projects to Hono and I just want to make sure that cookies will still be supported since I get a lot of use out of them 🙂 |
Yes, Hono will continue to support cookies! |
I still believe calling this middleware is misleading ~ I feel it would be more appropriate for the |
Indeed, helpers sounds good.
You have a point. I will consider re-categorizing these, changing their names, or revising the documentation accordingly. Thanks! |
Fixed by #1934 |
For Hono-based applications, there are not many cases in which using cookies. So rather than having
c.req.cookie()
andc.cookie()
as standard, I thought it would be better to provide a method to set and get a cookie.This will reduce the bundle size. This is a good change. However, since it is a breaking change, we must write a migration guide and output a polite error message when a user uses
c.req.cookie()
orc.cookie()
.The text was updated successfully, but these errors were encountered: