Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
al-http-request
Advanced tools
A simple yet powerful HTTP and HTTPS request library with extensive support for cookies, headers, query parameters, and body payloads.
#Http request support for cookies, headers, query parameters, and request bodies.
Before using this module, install the necessary dependencies:
npm install al-http-request
import { req } from 'al-http-request';
The req
function supports the following options:
method
(optional): HTTP method (GET
, POST
, PUT
, DELETE
). Default: GET
.headers
(optional): Object of headers.cookies
(optional): Object of cookies.params
(optional): Query parameters.body
(optional): Request payload (JSON format).const response = await req('https://example.com/api', {
params: { search: 'term', limit: 10 },
});
console.log(response.content);
const response = await req('https://example.com/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
cookies: { session: 'abc123' },
body: { username: 'user', password: 'pass' },
});
console.log(response.content);
try {
const response = await req('https://example.com/404');
console.log(response.content);
} catch (error) {
console.error(error.message);
}
tough-cookie
.This module is free to use for educational and personal projects.
FAQs
A simple yet powerful HTTP and HTTPS request library with extensive support for cookies, headers, query parameters, and body payloads.
We found that al-http-request demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.