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