dispatch/client/js/boot.js

12 lines
207 B
JavaScript
Raw Permalink Normal View History

2018-11-06 10:13:32 +00:00
/* eslint-disable no-underscore-dangle */
window.__init__ = fetch('/init', {
2018-11-06 10:13:32 +00:00
credentials: 'same-origin'
}).then(res => {
if (res.ok) {
return res.json();
}
throw new Error(res.statusText);
});