Body

Returns the request body.

  1. c.Body() string
  1. // curl -X POST http://localhost:8080 -d user=john
  2. app.Post("/", func(c *fiber.Ctx) {
  3. // Get raw body from POST request:
  4. c.Body() // user=john
  5. })

Returned value is only valid within the handler. Do not store any references.
Make copies or use the
Immutable setting instead. Read more…