
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A lightweight, type-safe HTTP client built on Node.js https module.
Includes a quick HttpGet function and a full-featured HttpClient class with GET/POST, timeout, headers, and error handling.
httpsHttpError with status & responseUsing npm:
npm install btch-http
Using yarn:
yarn add btch-http
Using pnpm:
pnpm add btch-http
Using bun:
bun add btch-http
HttpGetimport { HttpGet } from 'btch-http';
const result = await HttpGet<any>(
'ttdl', // endpoint
'https://tiktok.com/@user/video/123', // url to scrape
'1.0.0', // client version
30000, // timeout (ms)
'https://backend1.tioo.eu.org' // base URL
);
console.log(result);
Automatically appends
?url=...and sets proper headers.
HttpClientimport { HttpClient } from 'btch-http';
const client = new HttpClient({
baseUrl: 'https://api.example.com',
version: '2.0.0',
timeout: 10000,
});
// GET with query params
const res1 = await client.get<{ id: number }>('users', { active: '1' });
console.log(res1.data);
// POST with JSON body
const res2 = await client.post<{ success: boolean }>('login', {
username: 'john',
password: 'secret'
});
console.log(res2.status, res2.data);
// POST with custom headers
const res3 = await client.post('upload', { file: '...' }, {
Authorization: 'Bearer xyz'
});
interface HttpClientConfig {
baseUrl: string;
version: string;
timeout?: number; // default: 60000
defaultHeaders?: Record<string, string>;
}
interface HttpResponse<T> {
status: number;
statusText: string;
data: T | null;
headers: Record<string, string>;
}
try {
await client.get('not-found');
} catch (error) {
if (error instanceof HttpError) {
console.log(error.status); // e.g. 404
console.log(error.message); // e.g. "Not Found"
console.log(error.response?.data);
}
}
HttpErroris thrown for:
- HTTP status ≥ 300
- Network errors
- Timeouts
- JSON parse failures
export { HttpGet, HttpClient, HttpError };
export type { HttpClientConfig, HttpResponse };
import { HttpGet } from 'btch-http';
const url = 'https://www.tiktok.com/@omagadsus/video/7025456384175017243';
const data = await HttpGet(
'ttdl',
url,
'1.0.0',
30000,
'https://backend1.tioo.eu.org'
);
console.log('Download URL:', data.video);
MIT
FAQs
Custom HTTP client using Node.js https module
The npm package btch-http receives a total of 153,636 weekly downloads. As such, btch-http popularity was classified as popular.
We found that btch-http demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.