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

Function httpMethodFrom

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

Source from the content-addressed store, hash-verified

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

Callers 1

executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected