MCPcopy
hub / github.com/gofiber/fiber / Accepts

Method Accepts

req.go:51–54  ·  view source on GitHub ↗

Accepts checks if the specified extensions or content types are acceptable.

(offers ...string)

Source from the content-addressed store, hash-verified

49
50// Accepts checks if the specified extensions or content types are acceptable.
51func (r *DefaultReq) Accepts(offers ...string) string {
52 header := joinHeaderValues(r.c.fasthttp.Request.Header.PeekAll(HeaderAccept))
53 return getOffer(header, acceptsOfferType, offers...)
54}
55
56// AcceptsCharsets checks if the specified charset is acceptable.
57func (r *DefaultReq) AcceptsCharsets(offers ...string) string {

Callers

nothing calls this directly

Calls 2

joinHeaderValuesFunction · 0.85
getOfferFunction · 0.85

Tested by

no test coverage detected