Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

How do I get ipfs cat data? #3002

Closed
satoshi999 opened this issue Apr 24, 2020 · 2 comments
Closed

How do I get ipfs cat data? #3002

satoshi999 opened this issue Apr 24, 2020 · 2 comments

Comments

@satoshi999
Copy link

satoshi999 commented Apr 24, 2020

I tried ipfs.cat() of latest "ipfs-http-client".

download.js

(async() => {
  const chunks = []
  for await (const chunk of node.cat("QmZULkCELmmk5XNfCgTnCyFgAVxBRBXyDHGGMVoLFLiXEN", {timeout: 1000})) {
    chunks.push(chunk)
  }
  console.log(Buffer.concat(chunks).toString());
})();

This is result.

$ node download.js
(node:184) ExperimentalWarning: Readable[Symbol.asyncIterator] is an experimental feature. This feature could change at any time
hello

I don't need message of "(node:184) ExperimentalWarning: Readable[Symbol.asyncIterator] is an experimental feature. This feature could change at any time".

What should I do?

os:centos7(on docker)
ipfs-http-client ver:44.0.0
go-ipfs:go-ipfs_v0.4.23_linux-amd64

@achingbrain
Copy link
Member

achingbrain commented Apr 24, 2020

Please upgrade to a later version of node, then the warning will go away.

See: nodejs/node#26479

@satoshi999
Copy link
Author

@achingbrain
I understand. Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants