Trouble With | Requests II: fetch() GET Requests V


#1

Hello Coders,
I’m currently stuck with Requests II: fetch() GET Requests V. Specifically, the first excericise:

At the end of the .then() method, chain another .then() method.

Pass .then() a callback function that takes jsonResponse as its single parameter. This function should log jsonResponse to the console. Run the code.

Paste https://goo.gl/cjyLB1 into the input field and click “Expand”.

In the console, you should see an object with four properties. id is the short url you submitted and longUrl is the expanded version. Knowing the structure of the object will help us add it to our webpage.

I don’t know if I’m supposed to do this, or I’m just clueless, but I coudn’t find a

.then()

method anywhere. So heh. I’m not sure what to do. Anybody up for the challenge (however small it may be)?

Faithfully yours,

Emily Green


#2

there is a .then() method:

fetch(urlToExpand).then(response => {

its on line 16. You need to chain another .then() method to this .then() method

if the focus is on the editor, you can press ctrl + f to open a search box


#3

Okay, thanks, @stetim94!


#4