
Security News
Next.js Patches Critical Middleware Vulnerability (CVE-2025-29927)
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
request-as-curl
Advanced tools
[]
(https://npmjs.org/package/request-as-curl)
[]
(https://travis-ci.org/azproduction/node-request-as-curl)
[]
(https://coveralls.io/r/azproduction/node-request-as-curl)
[]
(https://gemnasium.com/azproduction/request-as-curl)
Serializes http.ClientRequest as curl(1) command string
request-as-curl
can be installed using npm
:
npm install request-as-curl
var curlify = require('request-as-curl'),
request = require('express'),
data = {data: 'data'};
var req = request('http://google.com/', {method: 'POST', json: data}, function (error, response, expected) {
// Note: req.req!
curlify(req.req, data);
// curl 'http://google.com' -H 'accept: application/json' -H 'content-type: application/json' -H 'connection: keep-alive' --data '{"data":"data"}' --compressed
});
var curlify = require('request-as-curl'),
app = require('express')();
app.get('/', function (req) {
curlify(req);
// curl 'http://localhost/pewpew' -H 'x-real-ip: 127.0.0.1' -H 'x-forwarded-for: 127.0.0.1' -H 'x-nginx-proxy: true' -H 'connection: close' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:25.0) Gecko/20100101 Firefox/25.0' -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'accept-language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3' -H 'accept-encoding: gzip, deflate' -H 'cache-control: max-age=0' --compressed
});
app.listen();
FAQs
Serializes http.ClientRequest as curl(1) command string
The npm package request-as-curl receives a total of 705 weekly downloads. As such, request-as-curl popularity was classified as not popular.
We found that request-as-curl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.