(value: string)
| 79 | }; |
| 80 | |
| 81 | export 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 | |
| 95 | const resolveBodyInput = (input: Option.Option<string>) => resolveOptionalTextInput(input); |
| 96 |
no outgoing calls
no test coverage detected
searching dependent graphs…