XHR

A Boolean property, that is true, if the request’s X-Requested-With header field is XMLHttpRequest, indicating that the request was issued by a client library (such as jQuery).

  1. c.XHR() bool
  1. // X-Requested-With: XMLHttpRequest
  2. app.Get("/", func(c *fiber.Ctx) {
  3. c.XHR() // true
  4. })