Questions
The following questions will test our knowledge of what we have just learned:
- What is wrong with the following HTTPÂ
POST
 request using theÂfetch
 function?fetch('http://localhost:17525/api/person', {   method: 'post',   headers: {     'Content-Type': 'application/json',   },   body: {     firstName: 'Fred'     surname: 'Smith'   } })
- What is wrong with the following request using theÂ
fetch
 function?const res = await fetch('http://localhost:17525/api/person/1'); console.log('firstName', res.body.firstName);
- What is wrong with the following request using theÂ
fetch
 function?fetch('http://localhost:17525/api/person/21312')   .then(res => res.json())   .catch(res => {     if ...