Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
ajax-best-promise
Advanced tools
Readme
Ajax with best promise - Ajax with stream data
This is a client-side module. Download here
AjaxBestPromise.get({
url:'http://example.com:3333/service/do.php',
data:{ alfa: 1, betha: 2}
}).then(function(result){
console.log(result);
}).catch(function(err){
console.log(err);
});
The main adventage of ajax-best-promise is the ability for process partial data
in three flavors: onChunk
, onLine
, onJson
AjaxBestPromise.get({
url:'http://example.com:3333/service/do.php',
data:{ alfa: 1, betha: 2}
}).onChunk(function(partialText){
console.log(partialText);
}).then(function(){
console.log('done!');
}).catch(function(err){
console.log(err);
});
Other adventage of ajax-best-promise is the ability for reconstruct the error object.
AjaxBestPromise.get({
url:'http://inexistent.com.ux/',
data:{ alfa: 1, betha: 2}
}).then(function(result){
console.log(result);
}).catch(function(err){
console.log(err); // 404 Cannot GET inexistent.com.ux
console.log(err.status); // 404
});
NPM version | Device | OS | nav | obs |
---|---|---|---|---|
0.1.3 | Samsung Galaxy Note 4 | Android 6.0.1 | Chrome Mobile 44.0.2403 | |
0.1.3 | iPad mini Retina | iOS 8.4.0 | Mobile Safari 8.0.0 | |
0.1.3 | VMWare | WinXP | IE 8.0.0 | polyfill:many - fail:line stream & json stream |
MIT
FAQs
Ajax with best promise - Ajax with stream data
We found that ajax-best-promise 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
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).