
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.
@gluttons/launcher
Advanced tools
请求发射器
npm i @gluttons/launcher -S
import { Launcher } from '@gluttons/launcher';
// 创建发射器
const launcher = new Launcher({
// 设置请求根路径
baseUrl: 'http://127.0.0.1',
});
// GET 请求
launcher.get('/getList').then((res) => {
console.log(res); // { code, data, message, timestamp, options }
});
// 带分页的 GET 请求
launcher.get('/getList', {
page: 1,
pageSize: 2,
}).then((res) = >{
console.log(res.pagination); // { count: number, page: number, pageSize: number }
});
const launcher = new Launcher<Launcher.ResponseExtra, {
// 当前页码
index: number;
// 每页数量
size: number;
}, {
// 总条数
total: number;
// 当前页码
current: number;
// 每页数量
length: number;
}>();
launcher.get('/getList', {
index: 1,
size: 2,
}).then((res) => {
console.log(res.pagination); // { total: number, current: number, length: number }
});
注意,code 与 data 是 必须的,不可更改
const launcher = new Launcher<{
msg: string;
err: boolean;
}>();
launcher.post('/add').then((res) => {
console.log(res); // { code, data, msg, err }
});
// 设置 token 和 语言
const launcher = new Launcher({
beforeHandler: ({
launcher,
}) => {
launcher.setAuthorization(getToken());
},
setHeaders: () => {
const lang = getCurrentLang();
return {
lang,
};
}
});
FAQs
基于Fetch的请求发射器
We found that @gluttons/launcher 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.