MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / httpMethodFrom

Function httpMethodFrom

packages/plugins/mcp/src/sdk/connection.ts:87–90  ·  view source on GitHub ↗
(method: string | undefined)

Source from the content-addressed store, hash-verified

85]);
86
87const httpMethodFrom = (method: string | undefined): HttpMethod => {
88 const normalized = (method ?? "GET").toUpperCase() as HttpMethod;
89 return HTTP_METHODS.has(normalized) ? normalized : "POST";
90};
91
92const headersFrom = (headers: HeadersInit | undefined): Headers =>
93 headers ? new Headers(headers) : new Headers();

Callers 2

isReplaySafeRequestFunction · 0.85
executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected