MCPcopy Index your code
hub / github.com/tinyhttp/tinyhttp / setVaryHeader

Function setVaryHeader

packages/res/src/headers.ts:78–82  ·  view source on GitHub ↗
(res: Response)

Source from the content-addressed store, hash-verified

76}
77
78export const setVaryHeader = <Response extends Res = Res>(res: Response) => (field: string): Response => {
79 vary(res, field)
80
81 return res
82}
83
84export const setContentType = <Response extends Res = Res>(res: Response) => (type: string): Response => {
85 const ct = type.indexOf('/') === -1 ? mime.lookup(type) : type

Callers 3

extendMiddlewareFunction · 0.90
formatResponseFunction · 0.90
res.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected