
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.