6.0.1 • Published 11 months ago

ipfs-http-response v6.0.1

Weekly downloads
4,832
License
Apache-2.0 OR MIT
Repository
github
Last release
11 months ago

⛔️ DEPRECATED: js-IPFS has been superseded by Helia

📚 Learn more about this deprecation or how to migrate

⚠️ If you continue using this repo, please note that security fixes will not be provided

ipfs-http-response

ipfs.tech Discuss codecov CI

Creates an HTTP response from an IPFS Hash

Table of contents

Install

$ npm i 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

License

Licensed under either of

Contribute

Contributions welcome! Please check out the issues.

Also see our contributing document for more information on how we work, and about contributing in general.

Please be aware that all interactions related to this repo are subject to the IPFS Code of Conduct.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

npm.io

6.0.0-6d95ce08

11 months ago

6.0.0-4694e806

11 months ago

6.0.0-7b79c1b8

11 months ago

6.0.0-e64813f6

11 months ago

6.0.1

11 months ago

5.0.0-d1c3abb3

1 year ago

6.0.0-b64d4af0

1 year ago

5.0.0-4b4c124c

1 year ago

5.0.0-fa578bac

1 year ago

6.0.0

1 year ago

6.0.0-3bcabe38

1 year ago

6.0.0-6eeb1be5

1 year ago

5.0.0-5f73ecad

1 year ago

6.0.0-ab02e8f8

1 year ago

5.0.0-789ee585

1 year ago

5.0.0

1 year ago

4.0.2-d1b0a8a7.0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

4.0.2-d75e0a39.0

2 years ago

3.0.5-051da161.0

2 years ago

4.0.1-b5456882.0

2 years ago

3.0.5-83f9882e.0

2 years ago

4.0.1-2a830bf5.0

2 years ago

4.0.2-dfc43d4e.0

2 years ago

4.0.1-7c676f63.0

2 years ago

4.0.2-acbc1c62.0

2 years ago

4.0.1-7304a0f4.0

2 years ago

3.0.1-764b4adc.0

2 years ago

2.0.4-7165bf71.0

2 years ago

2.0.4-4e93dd5d.0

2 years ago

3.0.4-00bd3dd0.0

2 years ago

3.0.4

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.1-be025c89.0

2 years ago

3.0.0

2 years ago

3.0.5-39dbf708.0

2 years ago

3.0.3-7be50bd1.0

2 years ago

2.0.4-919b27a8.0

2 years ago

3.0.1-87e00a69.0

2 years ago

3.0.1-ddfb899f.0

2 years ago

3.0.5-8f351a89.0

2 years ago

3.0.5-a05695fc.0

2 years ago

3.0.2-70e142ac.0

2 years ago

2.0.3

2 years ago

2.0.3-8f7ce23c.0

2 years ago

2.0.2

2 years ago

2.0.3-e90b8f13.0

2 years ago

2.0.2-df1bd1bb.0

2 years ago

2.0.2-125d42ba.0

2 years ago

2.0.2-1082fce9.0

2 years ago

1.0.6-rc.13

2 years ago

2.0.1-2afef2eb.0

2 years ago

1.0.6-rc.12

2 years ago

2.0.1-3a74c110.0

2 years ago

2.0.1-709831f6.0

2 years ago

2.0.1-8d260215.0

2 years ago

1.0.6-rc.11

2 years ago

1.0.7-5439a0e.0

2 years ago

1.0.6-rc.10

2 years ago

1.0.6

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.7-rc.0

2 years ago

1.0.7-rc.1

2 years ago

1.0.7-rc.2

2 years ago

1.0.7-rc.3

2 years ago

1.0.7-rc.4

2 years ago

1.0.7-rc.5

2 years ago

1.0.7-a6b201af.0

2 years ago

2.0.1-2c8ec080.0

2 years ago

1.0.6-rc.4

2 years ago

1.0.6-rc.3

2 years ago

1.0.6-rc.6

2 years ago

1.0.6-rc.5

2 years ago

1.0.6-rc.8

2 years ago

1.0.6-rc.7

2 years ago

1.0.6-rc.9

2 years ago

1.0.6-rc.2

2 years ago

1.0.6-rc.1

2 years ago

1.0.7-6cb3a87e.0

2 years ago

1.0.7-cca6e321.0

2 years ago

2.0.1-3a5d61d4.0

2 years ago

2.0.1-383dc07d.0

2 years ago

1.0.7-fbe14923.0

2 years ago

1.0.5-rc.2

2 years ago

1.0.5-rc.3

2 years ago

1.0.5-rc.0

2 years ago

1.0.5-rc.1

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.4-rc.0

2 years ago

1.0.4-rc.1

2 years ago

1.0.3-rc.6

2 years ago

1.0.3-rc.5

2 years ago

1.0.6-rc.0

2 years ago

1.0.3-rc.4

3 years ago

1.0.3-rc.3

3 years ago

1.0.3-rc.2

3 years ago

1.0.3-rc.1

3 years ago

1.0.2

3 years ago

1.0.2-rc.6286

3 years ago

1.0.3-rc.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.7.0

3 years ago

0.6.4

3 years ago

0.6.3

3 years ago

0.6.2

3 years ago

0.6.1

3 years ago

0.6.0

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.0

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago