p2p-fetch
v1.0.0
Published
A fetch interface which supports multiple peer to peer protocols
Maintainers
Readme
p2p-fetch
A fetch interface which supports multiple peer to peer protocols
Usage
npm i --save ipfs p2p-fetchconst makeP2PFetch = require('p2p-fetch')
const fetch = await makeP2PFetch()
const response = await fetch('ipns://ipfs.io/')
console.log(await response.text())API
For guides on using the Fetch API, look at the docs on Mozilla Developer Nework. For IPFS-specific fetch interfaces, look at js-ipfs-fetch
const fetch = await makeP2PFetch({ipfsOptions})
Initialize the fetch interface. You can optionally pass in some configuration settings for IPFS.
