Using fetch: Mixing await/async and .then/.finally syntax #24982
Labels
area: Fetch/XMLHttpRequest
Content:WebAPI
Web API docs
help wanted
If you know something about this topic, we would love your help!
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
What specific section or headline is this issue about?
No response
What information was incorrect, unhelpful, or incomplete?
The page starts of with a basic Promis .then/.finally syntax and then without warning shows the async/await method of fetch. I suggest
Remove the .then basic sample as it confuses the following examples and replace it with async/await basic sample.
Also the examples are getting quit specific for a page that give an overview.
I could also image a basic fetch() page that explains the two syntaxes and juxtaposition to XMLHttpRequest and than on another detailed page show simple, multiple files, CORS and other examples.
What did you expect to see?
A succinct illustration of fetch
Do you have any supporting links, references, or citations?
https://www.smashingmagazine.com/2020/11/comparison-async-await-versus-then-catch/
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/api/fetch_api/using_fetch
The text was updated successfully, but these errors were encountered: