MCPcopy
hub / github.com/sindresorhus/ky / withHeader

Function withHeader

test/hooks.ts:15–19  ·  view source on GitHub ↗
(request: Request, name: string, value: string)

Source from the content-addressed store, hash-verified

13import {createHttpTestServer} from './helpers/create-http-test-server.js';
14
15const withHeader = (request: Request, name: string, value: string) => {
16 const headers = new Headers(request.headers);
17 headers.set(name, value);
18 return new Request(request, {headers});
19};
20
21const createRequestLike = (request: Request): any => ({
22 get headers() {

Callers 1

hooks.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…