Updated Fetch Function

Get an overview of the new capabilities of our fetch function in this lesson.

About the application

In this application, we’ll look at our updated fetch function that uses the method keyword to determine the type of HTTPS request. It also has an onError keyword that gets triggered in case of any error in fetching data. It has an additional Google Analytics call that will record the URL requested by the client. Lastly, the buildParams() function gets properly delineated and encoded as a query string.

This is what the application will look like:

Get hands-on with 1400+ tech skills courses.