title: Axios POST request returning empty data on code but working at Insomnia/Postman
body: <p>I'm having problems with an axios request within react native, it sends a post with an id number called &quot;cpfcnpj&quot;, this number is fetched in PostgresSQL and returns the respective rows.
  It returns the rows perfectly in Insomnia and Postman, but in the code, response.data is coming as an empty array &quot;[]&quot; but with code 200, could someone help me? I'm pretty sure it could be a syntax error.</p>
  <p>(This occurs both on the localhost and on the heroku where the API is hosted)</p>
  <p><strong>AXIOS CODE:</strong></p>
  <pre><code>      
         await axios({
          method: 'post',       
           headers: {
          &quot;Content-Type&quot;: &quot;application/json&quot;,
        },
          url: 'https://api-carnedecasa.herokuapp.com/api/login',
          data: {
            cpfcnpj:&quot;15004799793&quot;
          }
        }).then((response) =&gt; {
          console.log(response.data);
        }, (error) =&gt; {
          console.log(error);
        });; 
  
  </code></pre>
  <p><strong>NODE BANCKEND CODE:</strong></p>
  <pre><code>
          process.env[&quot;NODE_TLS_REJECT_UNAUTHORIZED&quot;] = 0;
  
          (async () =&gt; {
             
              try {
                var res = await pool.query('SELECT * FROM cliente WHERE cpfcnpj = $1', [req.body.cpfcnpj])              
                var data = res.rows
              } finally {
                result.json(data)
               
              }
             
            })().catch(err =&gt; console.log(err.stack))
                  
            
       }, 
  
  </code></pre>
  <p><strong>REQ WORKING FINE ON INSOMNIA:</strong></p>
  <p><a href="https://i.stack.imgur.com/5WhVz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5WhVz.png" alt="enter image description here" /></a></p>
  <p>Thank you guys so much in advance!</p>