# React app + get no results / Network error

**URL:** <https://discuss.elastic.co/t/react-app-get-no-results-network-error/200871>\
**Category:** Elasticsearch\
**Created:** [September 24, 2019, 1:05pm UTC](https://discuss.elastic.co/t/react-app-get-no-results-network-error/200871 "2019-09-24T13:05:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![K29](https://avatars.discourse-cdn.com/v4/letter/k/fbc32d/32.png) [@K29](https://discuss.elastic.co/u/K29)\
**Post date:** [September 24, 2019, 1:05pm UTC](https://discuss.elastic.co/t/react-app-get-no-results-network-error/200871/1 "2019-09-24T13:05:31Z")

</div>

Hello,

I begin to use ElasticSearch, and I need to build a React App to get datas from an index. For this, I use a basic request to call my index :

```
    axios.get(url, {
      auth: {
        username: 'elastic',
        password: 'XXXXXXXXXXXXXXXXX'
      }})
   .then(results => {
     console.log(results);
   })
 .catch(error => {
   console.log(error.response);
  }); 

```

But, I get no results / or a Network error. I get the same problem with a fetch function.  
With other APIs I get some results without problem.

Is there a possibility that the problem come from the CORS? Or from a mistake in my request?

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 22, 2019, 1:05pm UTC](https://discuss.elastic.co/t/react-app-get-no-results-network-error/200871/2 "2019-10-22T13:05:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
