From the course: JavaScript: Ajax and Fetch
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Build an XHR request - JavaScript Tutorial
From the course: JavaScript: Ajax and Fetch
Challenge: Build an XHR request
(upbeat music) - [Instructor] It's time for a challenge. Ready to try your hand at getting information from an API? Another aspect that we want to change on Explore California form page is to add information about national parks in California. The National Park Service has an API that provides park information. So you can get this data using an Ajax request. Check out the developer guide and the API documentation at NPS.gov. Then create a request that returns information on national parks in California. You can reuse the functions you already created in this chapter, so just focus on actually constructing and implementing the URL. This is a longer challenge that might take you around 30 minutes. If you don't have time for that right now, feel free to come back to it later on. When you're done, join me in the next video, and I'll go over how I approached it.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
What is Ajax?2m 23s
-
(Locked)
Understand asynchronous program flow2m 53s
-
(Locked)
Get an API key6m 42s
-
(Locked)
Research and create an Ajax request URL3m 50s
-
(Locked)
Create an XHR request5m 13s
-
(Locked)
Test an XHR request5m 51s
-
(Locked)
Handle XHR success and failure5m 38s
-
(Locked)
Challenge: Build an XHR request56s
-
(Locked)
Solution: Build an XHR request5m 3s
-
-
-
-
-
-