(host: string, bearerOrOpts?: string | ClientOverrides)
| 7 | // Wraps createHttpClient + openAPIBase for tests so call sites read at a glance. |
| 8 | // Accepts a bare bearer string for the common case, or an options object for everything else. |
| 9 | export function testHttpClient(host: string, bearerOrOpts?: string | ClientOverrides): HttpClient { |
| 10 | const opts: ClientOverrides = typeof bearerOrOpts === 'string' |
| 11 | ? { bearer: bearerOrOpts } |
| 12 | : (bearerOrOpts ?? {}) |
| 13 | return createHttpClient({ baseURL: openAPIBase(host), ...opts }) |
| 14 | } |