# bare-http1

> Native HTTP/1 library for JavaScript

Latest version **4.6.1** (published 2026-09-01) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install bare-http1
pnpm add bare-http1
yarn add bare-http1
bun add bare-http1
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 4.6.1 |
| Published | 2026-09-01 |
| First published | 2023-06-10 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Holepunch |
| Maintainers | mafintosh |

## Links

- npm: https://www.npmjs.com/package/bare-http1
- Repository: https://github.com/holepunchto/bare-http1
- Homepage: https://github.com/holepunchto/bare-http1#readme
- Issues: https://github.com/holepunchto/bare-http1/issues
- npm.io page: https://npm.io/package/bare-http1

## Recent versions

- 4.6.1 (latest) — 2026-09-01
- 4.6.0 — 2026-08-31
- 4.5.9 — 2026-08-26
- 4.5.8 — 2026-08-13
- 4.5.7 — 2026-06-04
- 4.5.6 — 2026-04-10
- 4.5.5 — 2026-03-21
- 4.5.4 — 2026-03-19
- 4.5.3 — 2026-03-19
- 4.5.2 — 2026-03-18
- 4.5.1 — 2026-03-18
- 4.4.0 — 2026-03-16
- 4.3.1 — 2026-03-16
- 4.3.0 — 2026-03-12
- 4.2.4 — 2026-03-12
- … 43 more at https://npm.io/package/bare-http1/versions

## README

# bare-http1

HTTP/1 library for JavaScript.

```
npm i bare-http1
```

## Usage

```js
const http = require('bare-http1')

const server = http.createServer((req, res) => {
  res.statusCode = 200
  res.setHeader('Content-Length', 10)
  res.write('hello world!')
  res.end()
})

server.listen(0, () => {
  const { port } = server.address()
  console.log('server is bound on', port)

  const client = http.request({ port }, (res) => {
    res.on('data', (data) => console.log(data.toString()))
  })
  client.end()
})
```

## API

See the [`bare-http1` reference](https://docs.pears.com/reference/bare/modules/bare-http1).

## License

Apache-2.0

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