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

Function httpMethodFrom

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

Source from the content-addressed store, hash-verified

76]);
77
78const httpMethodFrom = (method: string | undefined): HttpMethod => {
79 const normalized = (method ?? "GET").toUpperCase() as HttpMethod;
80 return HTTP_METHODS.has(normalized) ? normalized : "POST";
81};
82
83const headersFrom = (headers: HeadersInit | undefined): Headers =>
84 headers ? new Headers(headers) : new Headers();

Callers 1

executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected