title: React Native Axios allow self signed ssl certificate
body: <p>I'm writing an app in React Native, and I need to make API requests. The server for that is running on a server with a self-signed SSL certificate, so I need Axios and React Native to make the request and accept the response using a self-signed certificate.</p>
  <ul>
  <li>I can't get a certificate from an official certificate authority.</li>
  <li>I have already tried using <code>https.Agent</code>, however this doesn't seem
  to be possible when using React Native (The https module is part of
  the node standard library, which is not included in React Native), so
  this is also not a valid solution.</li>
  <li>I would prefer to continue using Axios, however I would consider
  switching libraries if there are any with similar functionality (I've
  already tried a few, none provided functionality to allow self-signed
  certs).</li>
  </ul>
  <p>Here is some example code from my project (url is the IP of the server):</p>
  <pre class="lang-js prettyprint-override"><code>import axios from 'axios';
  
  const instance = axios.create({ });
  instance.get(url)
      .then(res =&gt; {
          this.setState({dataSource: res.data});
       })
  
  </code></pre>
  <p>Btw, when I'm using ngrok everything works fine, so the self-signed certificate is definitely the only problem.</p>