
Product
Introducing the Alert Details Page: A Better Way to Explore Alerts
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.
request-stream
Advanced tools
Send json request and responses over a stream
npm install request-stream
Lets try to setup a simple server
var rs = require('request-stream');
var net = require('net');
net.createServer(function(socket) {
var r = rs();
socket.pipe(r).pipe(socket);
r.on('request', function(request, respond) {
respond(null, {echo:request});
});
}).listen(9000);
Since the server is a tcp server we just need to create a tcp socket and pipe our request to that.
var socket = net.connect(9000);
var r = rs();
socket.pipe(r).pipe(socket);
r.request('echo me please', function(err, reply) {
console.log(err, reply);
});
Since r is just a stream we can pipe it to any kind of transport (even WebSockets using shoe).
FAQs
Extremely minimal wrapper around node core http/https to conveniently get request and response streams
The npm package request-stream receives a total of 285 weekly downloads. As such, request-stream popularity was classified as not popular.
We found that request-stream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

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.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.