
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.
fetchttp is a small http request/response helper based on fetch
1. Installation
Add fetchttp.js to your page
<script src="fetchttp.js"></script>
2. API
2.1 a minimal http get request would be like this:
fetchttp.get('https://yourdomain.com')
.end()
.then(raw => /* now raw is response from `yourdomain.com` */);
fetchttp support bellow methods:
2.2 Alternatively you can pass data as second argument:
fetchttp.post('https://yourdomain.com', { str: 'ymy' }).end();
2.3 Last arguments would always be fetch configuration which passes directly to native fetch:
fetchttp.patch('https://yourdomain.com/user/813', { str: 'ymy' }, {
mode: 'cors',
credentials: 'include'
}).end();
2.4 The reason why call end() method is inspired by mongoose's queryBuilder, which leet you generate your query step by step then do the query:
fetchttp.post('https://yourdomain.com')
.set('content-type', 'application/json')
.set('accept', 'application/json')
.set('x-csrftoken', '25818910680')
.send(data)
.end() // till now send the request
2.5 Finally there are senarios in Project your have to write
const commonConfig = Object.freeze({
headers: { /* ... */ }
mode: 'cors'
});
const prefix = 'https://yourdomain.com';
fetch('url', Object.assign(customConfig, commonConfig));
now just:
const api = fetchttp.create({
baseUrl: 'https://yourdomain.com/v1/',
options: {
headers: { /* ... */ },
mode: 'cors'
}
});
api.get('data').end(); // would send get request to https:\/\/yourdomain.com/data
FAQs
`fetchttp` is a small http request/response helper based on fetch
We found that fetchttp demonstrated a not healthy version release cadence and project activity because the last version was released 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.