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

Challenge: Build an XHR request - JavaScript Tutorial

From the course: JavaScript: Ajax and Fetch

Start my 1-month free trial

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.

Contents