# About handling CORS error while calling API using Axios

**URL:** <https://discuss.huggingface.co/t/about-handling-cors-error-while-calling-api-using-axios/59079>\
**Category:** 🔒 Gradio\
**Created:** [October 19, 2023, 5:03am UTC](https://discuss.huggingface.co/t/about-handling-cors-error-while-calling-api-using-axios/59079 "2023-10-19T05:03:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanjitaa](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@sanjitaa](https://discuss.huggingface.co/u/sanjitaa)\
**Post date:** [October 19, 2023, 5:03am UTC](https://discuss.huggingface.co/t/about-handling-cors-error-while-calling-api-using-axios/59079/1 "2023-10-19T05:03:57Z")

</div>

I am trying to consume API provided by the hugging face space after I build space using app.py. I tried to use Axios to consume API from frontend but I am facing the following issue :

 ![Screenshot 2023-10-19 at 10.47.34](https://us1.discourse-cdn.com/hellohellohello/original/3X/d/4/d4a56b1ae63bc158feb0682c7246f61d6ff6b890.png)
