Lesson 4 - XMLHttp Request Object
To request data from a server you must use an XMLHttpRequest object. All modern browsers have this built in. However you may want to create your own because it allows you to:
- Update a web page without having to reload the page
- Request or Recieve data from the server after the page has loaded
- Send data to a server in the background
Examples
Pull data from googleAPIs.com using an XMLHttp Request Object. Convert the object from a JSON object into a JavaScript object using JSON.parse This request will pull font information from the Google API. For convenience I will just display the first 10 items including the font family and font category. The entire object can be viewed in the console log.