ipfs-http-response

Creates an HTTP response from an IPFS Hash

js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details
Last updated 3 years ago by achingbrain .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install ipfs-http-response 
SYNC missed versions from official npm registry.

js-ipfs-http-response

standard-readme js-standard-style

Creates an HTTP response from an IPFS Hash

Installation

npm install ipfs-http-response

Usage

Creating HTTP Response

This project creates a HTTP response for an IPFS Path. This response can be a file, a HTML with directory listing or the entry point of a web page.

import { getResponse } from 'ipfs-http-response'

const result = await getResponse(ipfsNode, ipfsPath)
console.log(result)

Using protocol-agnostic resolver

This module also exports the used ipfs resolver, which should be used when the response needs to be customized or non-HTTP transport is used:

import { resolver } from 'ipfs-http-response'

const result = await resolver.cid(ipfsNode, ipfsPath)
console.log(result)

If ipfsPath points at a directory, resolver.cid will throw Error This dag node is a directory with a cid attribute that can be passed to resolver.directory:

import { resolver } from 'ipfs-http-response'

const result = await resolver.directory(ipfsNode, ipfsPath, cid)
console.log(result)

result will be either a string with HTML directory listing or an array with CIDs of index pages present in inspected directory.

ipfs-http-response usage

Current Tags

  • 6.0.1                                ...           latest (a year ago)
  • 6.0.0-7b79c1b8                                ...           next (a year ago)

136 Versions

  • 6.0.1 [deprecated]           ...           a year ago
  • 6.0.0-7b79c1b8 [deprecated]           ...           a year ago
  • 6.0.0-6d95ce08 [deprecated]           ...           a year ago
  • 6.0.0-4694e806 [deprecated]           ...           a year ago
  • 6.0.0-e64813f6 [deprecated]           ...           a year ago
  • 6.0.0-b64d4af0 [deprecated]           ...           2 years ago
  • 6.0.0-3bcabe38 [deprecated]           ...           2 years ago
  • 6.0.0-ab02e8f8 [deprecated]           ...           2 years ago
  • 6.0.0-6eeb1be5 [deprecated]           ...           2 years ago
  • 6.0.0 [deprecated]           ...           2 years ago
  • 5.0.0-d1c3abb3 [deprecated]           ...           2 years ago
  • 5.0.0-fa578bac [deprecated]           ...           2 years ago
  • 5.0.0-789ee585 [deprecated]           ...           2 years ago
  • 5.0.0-4b4c124c [deprecated]           ...           2 years ago
  • 5.0.0-5f73ecad [deprecated]           ...           2 years ago
  • 0.0.1-2a6fede5.0 [deprecated]           ...           2 years ago
  • 0.0.1-e85e5b6e.0 [deprecated]           ...           2 years ago
  • 0.0.1-563806f1.0 [deprecated]           ...           2 years ago
  • 5.0.1-6be59068.0 [deprecated]           ...           2 years ago
  • 5.0.1-6ae5eb7d.0 [deprecated]           ...           2 years ago
  • 5.0.1-58e6f468.0 [deprecated]           ...           2 years ago
  • 5.0.1-a77e40cc.0 [deprecated]           ...           2 years ago
  • 5.0.0 [deprecated]           ...           2 years ago
  • 4.0.2-0cee4a4c.0 [deprecated]           ...           2 years ago
  • 4.0.2-dfc43d4e.0 [deprecated]           ...           2 years ago
  • 4.0.2-acbc1c62.0 [deprecated]           ...           2 years ago
  • 4.0.2-d1b0a8a7.0 [deprecated]           ...           2 years ago
  • 4.0.2-d75e0a39.0 [deprecated]           ...           2 years ago
  • 4.0.1 [deprecated]           ...           2 years ago
  • 4.0.1-7304a0f4.0 [deprecated]           ...           2 years ago
  • 4.0.1-2a830bf5.0 [deprecated]           ...           2 years ago
  • 4.0.1-7c676f63.0 [deprecated]           ...           2 years ago
  • 4.0.1-b5456882.0 [deprecated]           ...           2 years ago
  • 4.0.0 [deprecated]           ...           2 years ago
  • 3.0.5-051da161.0 [deprecated]           ...           2 years ago
  • 3.0.5-83f9882e.0 [deprecated]           ...           2 years ago
  • 3.0.5-8f351a89.0 [deprecated]           ...           2 years ago
  • 3.0.5-39dbf708.0 [deprecated]           ...           2 years ago
  • 3.0.5-a05695fc.0 [deprecated]           ...           2 years ago
  • 3.0.4 [deprecated]           ...           2 years ago
  • 3.0.4-00bd3dd0.0 [deprecated]           ...           2 years ago
  • 3.0.3 [deprecated]           ...           2 years ago
  • 3.0.3-7be50bd1.0 [deprecated]           ...           2 years ago
  • 3.0.2 [deprecated]           ...           2 years ago
  • 3.0.2-70e142ac.0 [deprecated]           ...           2 years ago
  • 3.0.1 [deprecated]           ...           2 years ago
  • 3.0.1-87e00a69.0 [deprecated]           ...           2 years ago
  • 3.0.1-be025c89.0 [deprecated]           ...           2 years ago
  • 3.0.1-764b4adc.0 [deprecated]           ...           2 years ago
  • 3.0.1-ddfb899f.0 [deprecated]           ...           2 years ago
  • 3.0.0 [deprecated]           ...           2 years ago
  • 2.0.4-919b27a8.0 [deprecated]           ...           2 years ago
  • 2.0.4-4e93dd5d.0 [deprecated]           ...           2 years ago
  • 2.0.4-7165bf71.0 [deprecated]           ...           2 years ago
  • 2.0.3 [deprecated]           ...           3 years ago
  • 2.0.3-8f7ce23c.0 [deprecated]           ...           3 years ago
  • 2.0.3-e90b8f13.0 [deprecated]           ...           3 years ago
  • 2.0.2 [deprecated]           ...           3 years ago
  • 2.0.2-df1bd1bb.0 [deprecated]           ...           3 years ago
  • 2.0.2-125d42ba.0 [deprecated]           ...           3 years ago
  • 2.0.2-1082fce9.0 [deprecated]           ...           3 years ago
  • 2.0.1 [deprecated]           ...           3 years ago
  • 2.0.1-709831f6.0 [deprecated]           ...           3 years ago
  • 2.0.1-383dc07d.0 [deprecated]           ...           3 years ago
  • 2.0.1-3a74c110.0 [deprecated]           ...           3 years ago
  • 2.0.1-2c8ec080.0 [deprecated]           ...           3 years ago
  • 2.0.1-8d260215.0 [deprecated]           ...           3 years ago
  • 2.0.0 [deprecated]           ...           3 years ago
  • 1.0.7-cca6e321.0 [deprecated]           ...           3 years ago
  • 2.0.1-3a5d61d4.0 [deprecated]           ...           3 years ago
  • 2.0.1-2afef2eb.0 [deprecated]           ...           3 years ago
  • 1.0.7-6cb3a87e.0 [deprecated]           ...           3 years ago
  • 1.0.7-fbe14923.0 [deprecated]           ...           3 years ago
  • 1.0.7-a6b201af.0 [deprecated]           ...           3 years ago
  • 1.0.7-5439a0e.0 [deprecated]           ...           3 years ago
  • 1.0.7-7fe0da57f.0 [deprecated]           ...           3 years ago
  • 1.0.7-rc.5 [deprecated]           ...           3 years ago
  • 1.0.7-rc.4 [deprecated]           ...           3 years ago
  • 1.0.7-rc.3 [deprecated]           ...           3 years ago
  • 1.0.7-rc.2 [deprecated]           ...           3 years ago
  • 1.0.7-rc.1 [deprecated]           ...           3 years ago
  • 1.0.7-rc.0 [deprecated]           ...           3 years ago
  • 1.0.6 [deprecated]           ...           3 years ago
  • 1.0.6-rc.13 [deprecated]           ...           3 years ago
  • 1.0.6-rc.12 [deprecated]           ...           3 years ago
  • 1.0.6-rc.10 [deprecated]           ...           3 years ago
  • 1.0.6-rc.11 [deprecated]           ...           3 years ago
  • 1.0.6-rc.9 [deprecated]           ...           3 years ago
  • 1.0.6-rc.8 [deprecated]           ...           3 years ago
  • 1.0.6-rc.7 [deprecated]           ...           3 years ago
  • 1.0.6-rc.6 [deprecated]           ...           3 years ago
  • 1.0.6-rc.5 [deprecated]           ...           3 years ago
  • 1.0.6-rc.4 [deprecated]           ...           3 years ago
  • 1.0.6-rc.3 [deprecated]           ...           3 years ago
  • 1.0.6-rc.2 [deprecated]           ...           3 years ago
  • 1.0.6-rc.1 [deprecated]           ...           3 years ago
  • 1.0.6-rc.0 [deprecated]           ...           3 years ago
  • 1.0.5 [deprecated]           ...           3 years ago
  • 1.0.5-rc.3 [deprecated]           ...           3 years ago
  • 1.0.5-rc.2 [deprecated]           ...           3 years ago
  • 1.0.5-rc.1 [deprecated]           ...           3 years ago
  • 1.0.5-rc.0 [deprecated]           ...           3 years ago
  • 1.0.4 [deprecated]           ...           3 years ago
  • 1.0.4-rc.1 [deprecated]           ...           3 years ago
  • 1.0.4-rc.0 [deprecated]           ...           3 years ago
  • 1.0.3 [deprecated]           ...           3 years ago
  • 1.0.3-rc.6 [deprecated]           ...           3 years ago
  • 1.0.3-rc.5 [deprecated]           ...           3 years ago
  • 1.0.3-rc.4 [deprecated]           ...           3 years ago
  • 1.0.3-rc.3 [deprecated]           ...           3 years ago
  • 1.0.3-rc.2 [deprecated]           ...           3 years ago
  • 1.0.3-rc.1 [deprecated]           ...           3 years ago
  • 1.0.3-rc.0 [deprecated]           ...           3 years ago
  • 1.0.2 [deprecated]           ...           3 years ago
  • 1.0.2-rc.6286 [deprecated]           ...           3 years ago
  • 1.0.1 [deprecated]           ...           3 years ago
  • 1.0.0 [deprecated]           ...           3 years ago
  • 0.7.0 [deprecated]           ...           3 years ago
  • 0.6.4 [deprecated]           ...           4 years ago
  • 0.6.3 [deprecated]           ...           4 years ago
  • 0.6.2 [deprecated]           ...           4 years ago
  • 0.6.1 [deprecated]           ...           4 years ago
  • 0.6.0 [deprecated]           ...           4 years ago
  • 0.5.1 [deprecated]           ...           4 years ago
  • 0.5.0 [deprecated]           ...           5 years ago
  • 0.4.0 [deprecated]           ...           5 years ago
  • 0.3.1 [deprecated]           ...           5 years ago
  • 0.3.0 [deprecated]           ...           5 years ago
  • 0.2.2 [deprecated]           ...           6 years ago
  • 0.2.1 [deprecated]           ...           6 years ago
  • 0.2.0 [deprecated]           ...           6 years ago
  • 0.1.4 [deprecated]           ...           6 years ago
  • 0.1.3 [deprecated]           ...           6 years ago
  • 0.1.2 [deprecated]           ...           6 years ago
  • 0.1.1 [deprecated]           ...           6 years ago
  • 0.1.0 [deprecated]           ...           6 years ago
Downloads
Total 3
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (10)
Dev Dependencies (9)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE