(
options: HostedHttpClientOptions = {},
)
| 756 | * over constructing the two independently. |
| 757 | */ |
| 758 | export const makeHostedHttp = ( |
| 759 | options: HostedHttpClientOptions = {}, |
| 760 | ): { |
| 761 | readonly fetch: typeof globalThis.fetch; |
| 762 | readonly httpClientLayer: Layer.Layer<HttpClient.HttpClient>; |
| 763 | } => { |
| 764 | const resolve = makeSharedResolver(options); |
| 765 | return { |
| 766 | // oxlint-disable-next-line executor/no-raw-fetch -- boundary: exposes a guarded Fetch API adapter for libraries that require fetch |
| 767 | fetch: guardFetch(options.fetch ?? globalThis.fetch, options, resolve), |
| 768 | httpClientLayer: hostedHttpClientLayer(options, resolve), |
| 769 | }; |
| 770 | }; |
| 771 | |
| 772 | const hostedHttpClientLayer = ( |
| 773 | options: HostedHttpClientOptions, |
no test coverage detected