Get started with rsvp CDN
MIT licensed
RSVP: library for simplified asynchronous data flows, event handling in reactive programming.
Tags:- promises
- futures
Stable version
Copied!
How to start using rsvp CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with rsvp CDN - cdnhub.io</title>
<script src="https://cdn.cdnhub.io/rsvp/4.8.5/rsvp.min.js"></script>
</head>
<body>
<button id="loadData">Load Data</button>
<script>
const loadDataButton = document.getElementById('loadData');
RSVP.config({
concurrency: 1, // limit the number of concurrent requests
});
loadDataButton.addEventListener('click', () => {
Promise.all([
RSVP.get('https://api.example.com/data1'),
RSVP.get('https://api.example.com/data2'),
])
.then((responses) => {
const data1 = responses[0].json();
const data2 = responses[1].json();
// process the data here
console.log('Data 1:', data1);
console.log('Data 2:', data2);
})
.catch((error) => {
console.error('Error:', error);
});
});
</script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
All versions
1.0.0
1.1.0
1.2.0
2.0.0
2.0.1
2.0.2
2.0.3
2.0.4
3.0.0
3.0.1
3.0.12
3.0.13
3.0.14
3.0.15
3.0.16
3.0.17
3.0.18
3.0.19
3.0.2
3.0.20
3.0.21
3.0.3
3.0.4
3.0.6
3.0.7
3.0.8
3.0.9
3.1.0
3.2.0
3.2.1
3.3.0
3.3.1
3.3.2
3.3.3
3.4.0
3.5.0
3.6.0
3.6.1
3.6.2
4.0.0
4.0.1
4.0.2
4.6.1
4.7.0
4.8.0
4.8.1
4.8.2
4.8.3
4.8.4
*** 4.8.5