Let’s recap on the concepts covered in the previous exercises:

  1. GET and POST requests can be created a variety of ways.

  2. Use AJAX to asynchronously request data from APIs. fetch() and async/await are new functionalities developed in ES6 (promises) and ES8 respectively.

  3. Promises are a new type of JavaScript object that represent data that will eventually be returned from a request.

  4. fetch() is a web API that can be used to create requests. fetch() will return promises.

  5. We can chain .then() methods to handle promises returned by fetch().

  6. The .json() method converts a returned promise to a JSON object.

  7. async is a keyword that is used to create functions that will return promises.

  8. await is a keyword that is used to tell a program to continue moving through the message queue while a promise resolves.

  9. await can only be used within functions declared with async.


Congratulations on learning all about AJAX requests using fetch(), async, and await! These concepts are fundamental and will help you develop more robust web apps!

Play around with the browser and code to make GET and POST requests. If you’re going to make POST requests, make sure you assign apiKey your Rebrandly API key and run the code!

If you want to challenge yourself:

  • Rewrite the requests from scratch.
  • Replace the helper methods with your own code.
  • Use different APIs to make GET/POST requests using async/await.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?