Skip to content

Commit

Permalink
docs: use gateway CAR responses (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel authored Aug 5, 2022
1 parent cdc9617 commit 6c22c5f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $ ipfs-car --unpack my-files.car --output path/to/write/to
Fetch and locally verify files from a IPFS gateway over http

```sh
curl -X POST "https://ipfs.io/api/v0/dag/export?arg=bafybeidd2gyhagleh47qeg77xqndy2qy3yzn4vkxmk775bg2t5lpuy7pcu" | 🚘
curl "https://ipfs.io/ipfs/bafybeidd2gyhagleh47qeg77xqndy2qy3yzn4vkxmk775bg2t5lpuy7pcu?format=car" | 🚘
```

## Install
Expand Down Expand Up @@ -217,10 +217,7 @@ For larger CARs in the browser you can use IndexedDB by passing in an [IdbBlocks
import { unpackStream } from 'ipfs-car/unpack'
import { IdbBlockStore } from 'ipfs-car/blockstore/idb'

const res = fetch(
'https://ipfs.io/api/v0/dag/export?arg=bafkreigh2akiscaildcqabsyg3dfr6chu3fgpregiymsck7e7aqa4s52zy',
{ method: 'POST' }
)
const res = fetch('https://ipfs.io/ipfs/bafkreigh2akiscaildcqabsyg3dfr6chu3fgpregiymsck7e7aqa4s52zy?format=car')
const files = []
const blockstore = new IdbBlockStore()
for await (const file of unpackStream(res.body, { blockstore })) {
Expand Down

0 comments on commit 6c22c5f

Please sign in to comment.