0

I have tried getting a response from this link: https://squizler.herokuapp.com/verify-signin/54315681

I have used python requests library and https://reqbin.com/ online to fetch the json response and they worked fine.

However I need to fetch the json content from my Vue application. I have tried using Axios, request and XMLHttpRequest libraries but I kept receiving errors. I received "TypeError: Failed to fetch" from request library and "Network Error" from Axios and XMLHttpRequest libraries.

I have tried other URLs like https://api.coindesk.com/v1/bpi/currentprice.json and Axios/XMLHttpRequest/request fetched the json data fine, but still not working on my url.

I have been on this for hours, please assist me. Thanks in advance for your help.

  • 1
    Try instead using `https://cors-anywhere.herokuapp.com/https://squizler.herokuapp.com/verify-signin/54315681` as the request URL, and for an explantation, see the *How to use a CORS proxy to get around “No Access-Control-Allow-Origin header” problems* section of the answer at https://stackoverflow.com/a/43881141/441757 – sideshowbarker May 31 '20 at 07:23
  • @sideshowbarker Wow! It worked fine with the url. Thank you very very very very very much. Please could you explain in form of an answer why it worked, then I can accept your answer. Thank you so much. – Kingsley Michael May 31 '20 at 07:34
  • I think the answer at https://stackoverflow.com/a/43881141/441757 pretty much covers this. It’s an answer to a frequently asked question. I’m glad it worked as an answer for you too in this case. – sideshowbarker May 31 '20 at 07:36
  • Thank you so much Sir. Would read more on that. – Kingsley Michael May 31 '20 at 07:39

0 Answers0