MCPcopy
hub / github.com/tinyhttp/tinyhttp / getAccepts

Function getAccepts

packages/req/src/accepts.ts:6–6  ·  view source on GitHub ↗
(req: Request)

Source from the content-addressed store, hash-verified

4type Request = Pick<I, 'headers'>
5
6export const getAccepts = (req: Request) => (...types: string[]) => new Accepts(req).types(types)
7
8export const getAcceptsEncodings = (req: Request) => (...encodings: string[]) => new Accepts(req).encodings(encodings)
9

Callers 3

extendMiddlewareFunction · 0.90
formatResponseFunction · 0.90
req.test.tsFile · 0.90

Calls 1

typesMethod · 0.80

Tested by

no test coverage detected