Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
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
Closed
@satoshi999

Description

@satoshi999

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions