Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
xhr-promise-redux
Advanced tools
XMLHttpRequest implementation wrapped in a promise.js Promise object
Originally forked from frikille/promised-xhr
This module wraps XMLHttpRequest with in promise object. The promise implementation is Promises/A+ compliant and is provided by the promise.js Promise library.
Install via npm
$ npm install xhr-promise-redux
var xhr = require('xhr-promise-redux');
xhr.get(url, options)
xhr.post(url, options)
xhr.send(url, options)
xhr.get('/test-url', {
data: {
param: 'value'
},
headers: {
'Header-name': 'Header value'
},
responseType: 'json'
})
.then(function (response) {
console.log(`Success! The response JSON object: ${response.body}`);
})
.catch(function(response) {
console.log(`Error! Response Status Code: ${response.statusCode}`)
});
xhr.post('/test-url', {
json: {
param: 'value'
},
headers: {
'Header-name': 'Header value'
},
responseType: 'json'
})
.then(function (response) {
console.log(`Success! The response JSON object: ${response.body}`);
})
.catch(function(response) {
console.log(`Error! Response Status Code: ${response.statusCode}`)
});
xhr.send('/test-url', {
method: 'PUT',
json: {
param: 'value'
},
headers: {
'Header-name': 'Header value'
}
})
.then(function (response) {
console.log(`Success! The response JSON object: ${response.body}`);
})
.catch(function(response) {
console.log(`Error! Response Status Code: ${response.statusCode}`)
});
FAQs
XMLHttpRequest implementation wrapped in a promise.js Promise object
The npm package xhr-promise-redux receives a total of 141 weekly downloads. As such, xhr-promise-redux popularity was classified as not popular.
We found that xhr-promise-redux 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.