JSON response not coming in console.log while the url is correct

JSON response not coming in console.log while the url is correct
0.0 0

#1

I am using a form to get search query and as per log results URL is correct on clicking URL JSON response is opening, but doing ajax call with same URL is not showing up JSON data , even no error.

codepen link


#2

Click the Network tab, and refresh page to see where in the communication the breakdown happens.

my guess is you need to use https://cors-anywhere.herokuapp.com/


#3

the main thing is there is no network activity no JSON data is shown being retrieved


#4

Can you post the link to your codepen… you’ll get more responses.


#5

i have updated the post with link


#6

Your page is refreshing when the form is submitted. Add evn.preventDefault(); in your submit callback.


#7

Thanx man now it is working But if the form is refreshing than why will json response will not come up,
can you plz explain the issue .


#8

You’re getting a response, but you’re getting this error:
TypeError: response.query.pages[0] is undefined


#9

I got it now! Once Again Thank You for the help!