Learn JavaScript: Requests

In this course, you will learn the benefits of asynchronous JavaScript properties. You will create calls to various APIs using four different techniques.

Start[missing "en.views.course_landing_page.introduction-to-javascript.course_illustration" translation]
  1. 1

    Have you ever wondered what happens after you click a "Submit" button on a web page? For instance, if you are submitting information, where does the information go? How is the information processed...

  2. 2

    One of JavaScript's greatest assets is its non-blocking properties, or that it is an asynchronous language. Websites, like newspaper websites, take advantage of these non-blocking properties to...

  3. 3

    Asynchronous JavaScript and XML (AJAX), enables requests to be made after the initial page load. Initially, AJAX was used only for XML formatted data, now it can be used to make requests that have ...

  4. 4

    We are going to reconstruct XHR GET request boilerplate code step-by-step until we have written a complete GET request. Feel free to refer to the XHR GET diagram at any point while completing thi...

  5. 5

    By this point, you have an idea of how to write the boilerplate code for an AJAX request using an XHR object. In this exercise, you will incorporate that boilerplate code to make a GET request to...

  6. 6

    In the previous exercise, you made a GET request to the Datamuse API to find words that rhyme. In this exercise, we will create a request to set a topic and find adjectives that describe the input ...

  7. 7

    Reminder: If you haven’t already signed up for an API Key from Rebrandly, please read this Rebrandly sign up guide. * Codecademy Articles: Rebrandly URL Shortener API . Great! By this point you...

  8. 8

    We are going to reconstruct the code from the previous exercise step-by-step until we have written a complete AJAX POST request. Feel free to refer to the XHR POST diagram at any point while comp...

  9. 9

    Reminder: If you haven’t already signed up for an API Key from Rebrandly, please read the article: * Codecademy Articles: Rebrandly URL Shortener API . In this exercise, you'll be making a POST...

  10. 10

    You’ve done an amazing job navigating through making XHR GET and POST requests! Take some time to review the core concepts before moving on to the next lesson. 1. JavaScript is the language of the...

  1. 1

    In the previous lesson, we spent a lot of time dealing with asynchronous data (remember AJAX/ Asynchronous JavaScript And XML?). Many of our web page interactions rely on asynchronous events, so ma...

  2. 2

    The first type of requests we’re going to tackle are GET requests using [...] MDN: Fetch API . The [...] function: Creates a request object that contains relevant information that an API...

  3. 3

    We are going to reconstruct the boilerplate code necessary to create a GET request using the [...] function step-by-step. Feel free to refer to the [...] GET diagram at any point while comple...

  4. 4

    In the previous exercise, you wrote the boilerplate code for a GET request using [...] and [...] . In this exercise, you’re going to use that code and manipulate it to access the Datamuse API an...

  5. 5

    Great job making it this far! In the previous exercise, you created the query URL, called the [...] function and passed it the query URL and a settings object. Then, you chained a [...] metho...

  6. 6

    In the previous exercise, you successfully wrote a GET request using the fetch API and handled Promises to get word suggestions from Datamuse. Give yourself a pat on the back (or two to treat yours...

  7. 7

    We are going to reconstruct the code from the previous exercise step-by-step until we have written a complete POST request using [...] and [...] . Feel free to refer to the [...] POST diagram...

  8. 8

    In the previous exercise, you created the boilerplate code for making a POST request using [...] and [...] . In this exercise, you’re going to update that boilerplate code to allow you to shorte...

  9. 9

    In the previous exercise you’ve positioned yourself to make the POST request by providing the endpoint and the object containing all the necessary information. In this exercise you’ll handle the re...

  10. 10

    You’re almost done with the POST request you started a few lessons back! In fact, this time you’ll add another [...] to the chain to finally make the information available to your webpage! If y...

  11. 11

    Let’s take a minute to appreciate what you’ve accomplished so far: used [...] to make GET and POST requests. check the status of the responses coming back * catch errors that might possibly ...

  12. 12

    We are going to walk through and recreate the boilerplate code necessary to create a GET request using the [...] and [...] . Here are some key points to keep in mind as we walk through the code...

  13. 13

    In the previous exercise, we created the boilerplate code for making a GET request using [...] and [...] . In this exercise, you’re going to build on previously created boilerplate code to get...

  14. 14

    Now that you’ve made an [...] GET request, let’s start on getting you familiar the [...] POST request. As with the other GET and POST requests that you’ve been making, an [...] POST request...

  15. 15

    Now we’re going to piece together a POST request using [...] and [...] . Feel free to refer to the [...] / [...] diagram below at any point while completing this exercise: * [...] / [...] ...

  16. 16

    Since you’ve created the boilerplate code for a POST request, the next step is to incorporate that experience and logic into making a real request. In this exercise, you'll need to retrieve your ...

  17. 17

    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. [...] and [...]...

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo

Learn JavaScript: Requests

Start[missing "en.views.course_landing_page.introduction-to-javascript.course_illustration" translation]