In the context of this lesson, how is
fetch() different from
Although similar in terms of their purpose, there are some things that
fetch() introduced that made it different from
Probably the main difference was that
Promises. Promises made it easier and more convenient to write code for making asynchronous requests.
In addition, another difference is that with
Promise is always returned that resolves to the request’s
Response, whether or not it was successful.
Furthermore, when a
Response is retrieved using
fetch(), you are able to use a number of different methods to define the body content and how it should be handled.