What is fetch res => res.json()

Fetch related questions: stackOverflow link

.json() will just return the body as promise with json content.

Then a good read: fetch the document link


I've been confused before, do both axios and fetch have to use res => res.json()? I understand now

Axios does not need to use res.json at all

Axios related questions: StackOverflow link

Please look carefully in the linkhereLink (I marked it in the picture below)
axios

Guess you like

Origin blog.csdn.net/weixin_43814775/article/details/107995513