-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
Description
Bug Description
Setup Get request endpoint.
app.Get("/api/hello", func (c fiber.Ctx) error {
var payload struct {
Message string
}
if err := c.Bind().All(&payload); err != nil {
return err;
}
return c.JSON(payload.Message)
}
How to Reproduce
Use curl to make the request.
curl -v http://server.location/api/hello?message=worldResponse: Unprocessable Entity Error
Expected Behavior
Response: OK with message parameter returned back.
Fiber Version
3 beta 5
Code Snippet (optional)
package main
import "github.com/gofiber/fiber/v3"
import "log"
func main() {
app := fiber.New()
// Steps to reproduce
log.Fatal(app.Listen(":3000"))
}Checklist:
- I agree to follow Fiber's Code of Conduct.
- I have checked for existing issues that describe my problem prior to opening this one.
- I understand that improperly formatted bug reports may be closed without explanation.
Reactions are currently unavailable