New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bare-http1

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bare-http1

Native HTTP/1 library for JavaScript

1.1.2
Source
npm
Version published
Weekly downloads
1.5K
39.78%
Maintainers
1
Weekly downloads
 
Created
Source

bare-http1

Native HTTP/1 library for JavaScript.

npm i bare-http1

Only HTTP servers at the moment and current does NOT support server request bodies, but supports most other HTTP features (keep-alive, chunked encoding etc) and streaming server responses.

Usage

const http = require('bare-http1')

// Same API as Node.js

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

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

License

Apache-2.0

FAQs

Package last updated on 10 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts