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

Function httpMethodFrom

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

Source from the content-addressed store, hash-verified

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

Callers 1

executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected