Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
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.
The npm package al-http-request receives a total of 17 weekly downloads. As such, al-http-request popularity was classified as not popular.
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.