title: How to get file contents from ipfs-http-client
body: <p>I am using ipfs-http-client to read the contents of a file form infura, how do i use the &quot;cat&quot; funtionality to correctly get the data in a string/json format?</p>
  <pre class="lang-js prettyprint-override"><code> const client = create({
      url: ipfsUrl(),
      headers: {
        authorization: ipfsAuthPhrase(),
      },
    });
    const cidformat = &quot;f&quot; + cid.substring(2);
    const cidV0 = new CID(cidformat).toV0().toString();
    const resp = await client.cat(cidV0);
    let content = [];
    for await (const chunk of resp) {
      content = [...content, ...chunk];
    }
    console.log(content.toString());
  </code></pre>
  <p>right now i am just getting a array of binaries on the console log.</p>