2023-09-27 17:00:40 +00:00
|
|
|
# `makeStandardFetcher`
|
|
|
|
|
2023-12-31 03:35:48 +00:00
|
|
|
Make a fetcher from a `fetch()` API. It is used for making an instance of provider controls.
|
2023-09-27 17:00:40 +00:00
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
```ts
|
2023-12-29 16:47:49 +00:00
|
|
|
import { targets, makeProviders, makeDefaultFetcher } from '@movie-web/providers';
|
2023-09-27 17:00:40 +00:00
|
|
|
|
|
|
|
const providers = makeProviders({
|
2023-12-29 15:59:30 +00:00
|
|
|
fetcher: makeStandardFetcher(fetch),
|
|
|
|
target: targets.ANY,
|
2023-09-27 17:00:40 +00:00
|
|
|
});
|
|
|
|
```
|
|
|
|
|
|
|
|
## Type
|
|
|
|
|
|
|
|
```ts
|
2023-12-29 15:59:30 +00:00
|
|
|
function makeStandardFetcher(fetchApi: typeof fetch): Fetcher;
|
2023-09-27 17:00:40 +00:00
|
|
|
```
|