# @libp2p/http-utils

> Shared utils and common code for HTTP modules

Latest version **2.0.6** (published 2026-07-03) · Apache-2.0 OR MIT license · 0 weekly downloads

## Install

```sh
npm install @libp2p/http-utils
pnpm add @libp2p/http-utils
yarn add @libp2p/http-utils
bun add @libp2p/http-utils
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.6 |
| Published | 2026-07-03 |
| First published | 2025-05-28 |
| Weekly downloads | 0 |
| License | Apache-2.0 OR MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 13 |
| Unpacked size | 1.8 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 13 |
| Maintainers | daviddias, alanshaw, achingbrain, vascosantos, npm-service-account-libp2p, jacobheun |

## Links

- npm: https://www.npmjs.com/package/@libp2p/http-utils
- Repository: https://github.com/libp2p/js-libp2p-http
- Homepage: https://github.com/libp2p/js-libp2p-http/tree/main/packages/http-utils#readme
- Issues: https://github.com/libp2p/js-libp2p-http/issues
- npm.io page: https://npm.io/package/@libp2p/http-utils

## Dependencies (13)

- [race-event](https://npm.io/package/race-event.md) ^1.6.1
- [uint8arrays](https://npm.io/package/uint8arrays.md) ^6.1.1
- [multiformats](https://npm.io/package/multiformats.md) ^14.0.0
- [@libp2p/utils](https://npm.io/package/@libp2p/utils.md) ^7.0.15
- [uint8arraylist](https://npm.io/package/uint8arraylist.md) ^3.0.2
- [@libp2p/peer-id](https://npm.io/package/@libp2p/peer-id.md) ^6.0.6
- [readable-stream](https://npm.io/package/readable-stream.md) ^4.7.0
- [@libp2p/interface](https://npm.io/package/@libp2p/interface.md) ^3.2.0
- [@multiformats/multiaddr](https://npm.io/package/@multiformats/multiaddr.md) ^13.0.3
- [@achingbrain/http-parser-js](https://npm.io/package/@achingbrain/http-parser-js.md) ^0.5.9
- [it-to-browser-readablestream](https://npm.io/package/it-to-browser-readablestream.md) ^2.0.14
- [@multiformats/multiaddr-to-uri](https://npm.io/package/@multiformats/multiaddr-to-uri.md) ^12.0.0
- [@multiformats/uri-to-multiaddr](https://npm.io/package/@multiformats/uri-to-multiaddr.md) ^10.0.0

## Recent versions

- 2.0.6 (latest) — 2026-07-03
- 2.0.5 — 2026-06-15
- 2.0.4 — 2026-06-14
- 2.0.3 — 2026-06-14
- 2.0.2 — 2026-04-28
- 2.0.1 — 2025-10-13
- 2.0.0 — 2025-10-02
- 1.0.2 — 2025-08-05
- 1.0.1 — 2025-06-27
- 1.0.0 — 2025-05-28
- 0.0.0 — 2025-05-28

## README

# @libp2p/http-utils

[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-http.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-http)
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-http/js-test-and-release.yml?branch=main\&style=flat-square)](https://github.com/libp2p/js-libp2p-http/actions/workflows/js-test-and-release.yml?query=branch%3Amain)

> Shared utils and common code for HTTP modules

# About

<!--

!IMPORTANT!

Everything in this README between "# About" and "# Install" is automatically
generated and will be overwritten the next time the doc generator is run.

To make changes to this section, please update the @packageDocumentation section
of src/index.js or src/index.ts

To experiment with formatting, please run "npm run docs" from the root of this
repo and examine the changes made.

-->

Contains shared code and utilities used by `@libp2p/http-*` modules.

# Install

```console
$ npm i @libp2p/http-utils
```

## Browser `<script>` tag

Loading this module through a script tag will make its exports available as `Libp2pHttpUtils` in the global namespace.

```html
<script src="https://unpkg.com/@libp2p/http-utils/dist/index.min.js"></script>
```

# API Docs

- <https://libp2p.github.io/js-libp2p-http/modules/_libp2p_http-utils.html>

# License

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p-http/blob/main/packages/http-utils/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p-http/blob/main/packages/http-utils/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

# Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

---
_Source: https://npm.io/package/@libp2p/http-utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
