Cross origin resource sharing(CORS) /Cross origin read block (CORB)

Hi,
I just wanted to know how we can avoid CORS/CORB related errors while calling API.
how to solve CORS related problem?
In one of my project, while callingn API it says “cross origin read block” and I am getting empty data header on localhost, while direct call to API on same browser gives me json response.

Any help would be appreciated.
Thanks.

You will want to use proxy services. Take a look at

https://corsproxy.github.io/

https://cors-anywhere.herokuapp.com/

You can prepend these urls before the request urls to get by cross-origin-issues.

Thanks Shimphillip.
https://cors-anywhere.herokuapp.com/. It worked.
Thank you so much for your help!