Go/Fiber: Difference between revisions

From Fundamental Ramen
< Go
Jump to navigation Jump to search
 
Line 2: Line 2:


<syntaxhighlight 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)
})