December 2019
Intermediate to advanced
598 pages
12h 21m
English
The following questions will test our knowledge of what we have just learned:
fetch('http://localhost:17525/api/person', { method: 'post', headers: { 'Content-Type': 'application/json', }, body: { firstName: 'Fred' surname: 'Smith' }})
fetch('http://localhost:17525/api/person/1') .then(res => { console.log('firstName', res.body.firstName); })
fetch('http://localhost:17525/api/person/21312') .then(res => res.json()) .catch(res => { if (res.status === 404) { console.log('person not found') } });
Read now
Unlock full access