p2p-fetch

1.0.0 • Public • Published

p2p-fetch

A fetch interface which supports multiple peer to peer protocols

Usage

npm i --save ipfs p2p-fetch
const 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.

Dependents (0)

Package Sidebar

Install

npm i p2p-fetch

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

3.92 kB

Total Files

5

Last publish

Collaborators

  • rangermauve