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

Function parseProxyHeader

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

Source from the content-addressed store, hash-verified

79};
80
81export const parseProxyHeader = (value: string): { name: string; value: string } => {
82 const idx = value.indexOf(':');
83 if (idx <= 0) {
84 throw new Error(`Invalid header "${value}". Use "Name: value".`);
85 }
86
87 const name = value.slice(0, idx).trim();
88 const headerValue = value.slice(idx + 1).trim();
89 if (!name) {
90 throw new Error(`Invalid header "${value}". Missing header name.`);
91 }
92 return { name, value: headerValue };
93};
94
95const resolveBodyInput = (input: Option.Option<string>) => resolveOptionalTextInput(input);
96

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…