var url = 'http://localhost:8000/employees/'; fetch (url) .then(res => res.json()) .then(data => { console.log(data); }).catch(err => { console.log(err); });