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).
func (c *Ctx) XHR() bool
// X-Requested-With: XMLHttpRequest
app.Get("/", func(c *fiber.Ctx) error {
c.XHR() // true
// ...
})