Links

Joins the links followed by the property to populate the response’s Link HTTP header field.

  1. func (c *Ctx) Links(link ...string)
  1. app.Get("/", func(c *fiber.Ctx) error {
  2. c.Links(
  3. "http://api.example.com/users?page=2", "next",
  4. "http://api.example.com/users?page=5", "last",
  5. )
  6. // Link: <http://api.example.com/users?page=2>; rel="next",
  7. // <http://api.example.com/users?page=5>; rel="last"
  8. // ...
  9. })