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

🚀 [Feature]: CookieParser #2639

Closed
3 tasks done
balcieren opened this issue Sep 19, 2023 · 4 comments · Fixed by #2656
Closed
3 tasks done

🚀 [Feature]: CookieParser #2639

balcieren opened this issue Sep 19, 2023 · 4 comments · Fixed by #2656
Assignees

Comments

@balcieren
Copy link
Contributor

Feature Description

I think it is a feature that can be added

Additional Context (optional)

No response

Code Snippet (optional)

package main

import "github.com/gofiber/fiber/v2"

type Cookie struct {
	Name string `json:"name" cookie:"name"`
}

func main() {
	app := fiber.New()

	app.Get("/", func(c *fiber.Ctx) error {
		var cookies Cookie
		if err := c.CookieParser(&cookies); err != nil {
			return err
		}

		return c.SendString(cookies.Name)
	})

	app.Listen(":3000")
}

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my suggestion prior to opening this one.
  • I understand that improperly formatted feature requests may be closed without explanation.
@joey1123455
Copy link
Contributor

Is any one working on this at the moment, I'm available to work on it

@joey1123455
Copy link
Contributor

Quick question, while parsing the cookie result would we need just the cookie value or also the value and its attributes, thinking about making it viable for both?

@balcieren
Copy link
Contributor Author

@joey1123455 Actually working system is similar to QueryParser. What's more I tried to make cookie parser but I got panic error.

@joey1123455
Copy link
Contributor

joey1123455 commented Oct 4, 2023

@joey1123455 Actually working system is similar to QueryParser. What's more I tried to make cookie parser but I got panic error.

Aiit, I have implemented it, just writing the tests. What package where you working with when the panic was raised and what we're you doing?

@joey1123455 joey1123455 mentioned this issue Oct 5, 2023
11 tasks
@ReneWerner87 ReneWerner87 linked a pull request Oct 5, 2023 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants