A Fetch API implementation for the Dat SDK (Hypercore) enabling p2p content loading from hyper:// URLs. Version 24.0.1, actively maintained on GitHub. Supports HEAD, GET, POST, DELETE methods with custom headers like X-Copy, X-Timer, X-Opt for drive management. Differentiates by providing a familiar fetch interface for decentralized storage.
npm install log-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic GET request to user's drive with timeout header using log-fetch.
Ensure X-Copy header is only used for HEAD requests.
Convert timer value to string: 'X-Timer': String(5000).
Ensure key is a 64-character hex string representing 32 bytes.
Replace dat:// with hyper:// in URLs.
Use either '_' for user's drive or a 64-char hex string as hostname.
Verify the hyper:// URL is correctly formatted and the peer is online.
Use import fetch from 'log-fetch' instead of import { fetch }.