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

Function httpMethodFrom

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

Source from the content-addressed store, hash-verified

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

Callers 2

isReplaySafeRequestFunction · 0.85
executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected