title: react native api calls using axios
body: <p>I have nodeJs back end where i have created this api</p>
  <pre><code>app.post(&quot;/addInvoice&quot;, (req, res) =&gt; {
    let invoice = req.body;
    var sql =
      &quot;INSERT INTO invoice (address, email, billnumber, price, status) VALUES(?, ?, ?, ?, 'sent');&quot;;
    mysqlConnection.query(
      sql,
      [
        invoice.address,
        invoice.customeremail,
        invoice.billnumber,
        invoice.totalprice,
      ],
      (err, rows, fields) =&gt; {
        if (!err) {
          res.send(rows);
        } else {
          res.send(err);
        }
      }
    );
  });
  </code></pre>
  <p>when I call this API using post man it works perfectly.</p>
  <p>but now i need to call it on buttonclick from my react-native app.</p>
  <pre><code>axios
        .post(&quot;http://localhost:3000/addInvoice&quot;, {
          address: address,
          customeremail: email,
          billnumber: invoicenumber,
          totalprice: totalPrice,
        })
        .then((response) =&gt; {
          alert(response);
        });
  </code></pre>
  <p>I nothing happens when I send this and the alert(responce) returns nothing.</p>
  <p>what could be the problem?</p>