
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.
reactors-http-request
Advanced tools
reactors-http-request negotiates HTTP(s) transactions for reactors.
Most of the times you are fine using the Fetch API. It is supported both by React Native for Android and iOS and is a HTML spec - so it works both for web and desktop. Yet, for web and desktop, the fetch API won't handle requests to other domains. For these cases, you can use reactors-http-request.
It will then use superagent. We try to add as much support as possible to various cases such as streaming or cache handling.
npm install --save reactors-http-request
request(url: string, options?: Object)
import request from 'reactors-http-request';
async function createNewFoo(url, foo) {
const res = await request(url, {method: 'POST', payload: foo});
const {ok, body, error} = res;
return ok ? body : error;
}
request(url, {method: 'POST', payload: {foo: 1}});
You can set headers as such:
request(url, {headers: {['X-HEADER']: 'foo'}});
JSON is detected for both requests (so you don't need to set the Content-Type header) and for responses (so you don't need to parse the text - it is already in JSON).
FAQs
reactors-http-request ===
We found that reactors-http-request 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.