chunk-fetch provides a browser-compatible fetch() API for HTTP requests to IPFS, enabling interaction with IPFS content using familiar fetch patterns. The library supports HEAD, GET, POST, and DELETE methods with IPFS-style URLs (ipfs://). Hostname can be '_' to ignore hostname, or a CID for direct content retrieval. Additional headers like X-Copy, X-Timer, and X-Opt control behavior. Version 25.0.4 is current. It differentiates from other IPFS HTTP clients by mimicking the Web Fetch API exactly, reducing learning curve for developers already familiar with fetch. Release cadence is irregular; maintenance is active with recent updates.
npm install chunk-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic GET request to IPFS using chunk-fetch, with timeout header and response handling.
Use import or dynamic import().
Always use ipfs://_/path instead of ipfs:///path
Handle response as text or json after delete.
Watch changelog for updates.
Always JSON.stringify() options object before setting header.
Switch to import statement or use dynamic import('chunk-fetch').Use ipfs://_/path instead of ipfs:///path
Ensure X-Opt is stringified: JSON.stringify(options)