| 8 | import { CLI_VERSION } from '../version'; |
| 9 | |
| 10 | export interface RequestOpts { |
| 11 | url: string; |
| 12 | method?: string; |
| 13 | body?: unknown; |
| 14 | headers?: Record<string, string>; |
| 15 | timeout?: number; |
| 16 | stream?: boolean; |
| 17 | noAuth?: boolean; |
| 18 | authStyle?: 'bearer' | 'x-api-key'; |
| 19 | } |
| 20 | |
| 21 | export async function request(config: Config, opts: RequestOpts): Promise<Response> { |
| 22 | const isFormData = typeof FormData !== 'undefined' && opts.body instanceof FormData; |
nothing calls this directly
no outgoing calls
no test coverage detected