Go/Fiber: Difference between revisions
< Go
Jump to navigation
Jump to search
(Created page with "= Body = <syntaxhighlignt lang="go"> c.Body() </syntaxhighlight>") |
(→Body) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
= Body = | = Body = | ||
< | <syntaxhighlight lang="go"> | ||
c.Body() | api.Post("/realtime-report", func(c *fiber.Ctx) error { | ||
c.Body() | |||
payload := types.ApiStandardResponse{ | |||
Code: 0, | |||
Message: "Okay", | |||
} | |||
return c.JSON(payload) | |||
}) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 01:51, 26 May 2025
Body
api.Post("/realtime-report", func(c *fiber.Ctx) error {
c.Body()
payload := types.ApiStandardResponse{
Code: 0,
Message: "Okay",
}
return c.JSON(payload)
})