providers/.docs/content/5.api-reference/7.makeStandardFetcher.md

21 lines
407 B
Markdown
Raw Normal View History

2023-09-27 17:00:40 +00:00
# `makeStandardFetcher`
2023-12-29 15:59:30 +00:00
Make a fetcher from a `fetch()` API. It is used for making a 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
```