Go/Fiber: Difference between revisions

From Fundamental Ramen
< Go
Jump to navigation Jump to search
(Created page with "= Body = <syntaxhighlignt lang="go"> c.Body() </syntaxhighlight>")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
= Body =
= Body =


<syntaxhighlignt lang="go">
<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)
})