Requests
In this course, you will learn the benefits of asynchronous JavaScript properties. You will create calls to various APIs using four different techniques.
StartKey Concepts
Review core concepts you need to learn to master this subject
HTTP GET request
JSON: JavaScript Object Notation
Asynchronous calls with XMLHttpRequest
The query string in a URL
XMLHttpRequest
GET Request Requirements
HTTP POST request
HTTP POST request with the XMLHttpRequest
API
ok property fetch api
HTTP GET request
HTTP GET request
HTTP GET
requests are made with the intention of retrieving information or data from a source (server) over the web.
GET
requests have no body, so the information that the source requires, in order to return the proper response, must be included in the request URL path or query string.
- 1Have 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…
- 2One 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…
- 3Asynchronous 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 …
- 4We 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…
- 5By 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…
- 6In 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 …
- 7Reminder: 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, yo…
- 8We 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…
- 9Reminder: If you haven’t already signed up for an API Key from Rebrandly, please read our Rebrandly URL Shortener API article. Keep in mind, while it’s ok to use your API key in these exercises, …
- 10You’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…
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory