MCPcopy
hub / github.com/ComposioHQ/composio / normalizeProxyMethod

Function normalizeProxyMethod

ts/packages/cli/src/commands/proxy.cmd.ts:73–79  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

71] as const satisfies ReadonlyArray<ProxyMethod>;
72
73export const normalizeProxyMethod = (value: string): ProxyMethod => {
74 const normalized = value.trim().toUpperCase();
75 if (!SUPPORTED_PROXY_METHODS.includes(normalized as ProxyMethod)) {
76 throw new Error('Unsupported method. Use one of GET, POST, PUT, DELETE, PATCH.');
77 }
78 return normalized as ProxyMethod;
79};
80
81export const parseProxyHeader = (value: string): { name: string; value: string } => {
82 const idx = value.indexOf(':');

Callers 2

proxy.cmd.test.tsFile · 0.90
proxy.cmd.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…