mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 15:03:26 +00:00
Redo folder structure
This commit is contained in:
23
.docs/content/5.api-reference/8.makeSimpleProxyFetcher.md
Normal file
23
.docs/content/5.api-reference/8.makeSimpleProxyFetcher.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# `makeSimpleProxyFetcher`
|
||||
|
||||
Make a fetcher to use with [movie-web/simple-proxy](https://github.com/movie-web/simple-proxy). This is for making a proxiedFetcher, so you can run this library in the browser.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import { targets, makeProviders, makeDefaultFetcher, makeSimpleProxyFetcher } from "@movie-web/providers";
|
||||
|
||||
const proxyUrl = "https://your.proxy.workers.dev/"
|
||||
|
||||
const providers = makeProviders({
|
||||
fetcher: makeDefaultFetcher(fetch),
|
||||
proxiedFetcher: makeSimpleProxyFetcher(proxyUrl, fetch),
|
||||
target: targets.BROWSER,
|
||||
});
|
||||
```
|
||||
|
||||
## Type
|
||||
|
||||
```ts
|
||||
function makeSimpleProxyFetcher(proxyUrl: string, fetchApi: typeof fetch): Fetcher;
|
||||
```
|
Reference in New Issue
Block a user