Skip to content

Commit 86b7e70

Browse files
committed
before subdomain logic
1 parent a3fbec0 commit 86b7e70

File tree

6 files changed

+303
-144
lines changed

6 files changed

+303
-144
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,15 @@ resolve("QmaiJczLW9X1Gk7rQH7CgYCuquLZMbdWB6hhqznDBoqdLE")
1919
})
2020
.catch(console.error);
2121
```
22+
23+
## Node-Fetch Support
24+
If using this library in `<16.x.x` versions of node on a backend and not a browser, then you will need to use [node-fetch](https://www.npmjs.com/package/node-fetch). However, only versions `<=2.6.6` will work automatically. If you are using `>2.6.6` then you will need to pass in your fetch function manually.
25+
26+
```typescript
27+
import {resolve} from "ipfs-race";
28+
import fetch from "node-fetch";
29+
30+
resolve("QmaiJczLW9X1Gk7rQH7CgYCuquLZMbdWB6hhqznDBoqdLE", {fetchOverride: fetch})
31+
.then(...)
32+
.catch(console.error);
33+
```

0 commit comments

Comments
 (0)