Ajax in javascript example not working

I have seen the previous queries and still not able to understand whats wrong with the code. I am thereby attaching the screenshot.

1 Like

@gs5709 the code is all right. Just replace the api route to

https://reqres.in/api/users

As you have stated only http protocol so that is why the Internet firewall is not able to execute the response coming back from the server side. Nowadays almost every API request follows the Cross-Origin Resource Sharing (CORS) mechanism for the data communication part. So its better to use https way of calling.

I hope your query is solved :slight_smile: If it is so, then do close the query by clicking on the Solution button in the post

1 Like

Thank you so much sir

1 Like