This workshop will be retired on August 31, 2026.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Working with the Fetch API!
You have completed Working with the Fetch API!
Preview
In this video, we'll display the image on the page, and fetch the list of breeds to display the <select> menu options.
Code Snippets
fetch('https://dog.ceo/api/breeds/list')
Resources
Related videos
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
we're getting the actual json data
with the URL to display our image.
0:00
So, now we'll need to display
the image on the page and
0:02
later populate the select menu
with a list of breed options.
0:04
So first up, in the second then method,
0:08
I'll replace the console.log
with a call to a function
0:11
named generateImage()
passing it data.message.
0:17
Next we'll need to create this function.
0:22
So right below the helper functions
comment create the function generateImage.
0:24
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up