MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/functions-framework-nodejs / createRequest

Function createRequest

test/function_wrappers.ts:20–30  ·  view source on GitHub ↗
(
    body: object | string,
    headers?: {[key: string]: string},
  )

Source from the content-addressed store, hash-verified

18 };
19
20 const createRequest = (
21 body: object | string,
22 headers?: {[key: string]: string},
23 ) =>
24 ({
25 body,
26 // eslint-disable-next-line @typescript-eslint/no-unused-vars
27 header: (h: string) => {
28 return headers === undefined ? '' : headers[h];
29 },
30 }) as Request;
31
32 class ResponseMock extends EventEmitter {
33 public headers: {[key: string]: string} = {};

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected