From 78f2e02891166d2859c41b65ac2e79ba222d245f Mon Sep 17 00:00:00 2001 From: Fin Date: Sun, 26 Dec 2021 22:18:32 +0800 Subject: [PATCH] support query args in json request --- route_push.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/route_push.go b/route_push.go index 332928ee..164503b5 100644 --- a/route_push.go +++ b/route_push.go @@ -69,6 +69,10 @@ func routeDoPushV2(c *fiber.Ctx) error { if err := c.BodyParser(¶ms); err != nil && err != fiber.ErrUnprocessableEntity { return c.Status(400).JSON(failed(400, "request bind failed: %v", err)) } + // parse query args (medium priority) + c.Request().URI().QueryArgs().VisitAll(func(key, value []byte){ + params[strings.ToLower(string(key))] = string(value) + }) return push(c, params) }