Ajax Service for JSON requests and responses
Ajax.get('/unicorns')
.then(data => ...)
.catch(reason => ...);
Ajax.post('/unicorns/create', unicorn)
.then(data => ...)
.catch(reason => ...);
Ajax.method('delete', `/unicorns/${unicornId}`, {})
.then(data => ...)
.catch(reason => ...);
GPL-3.0