title: SSL certificate - disable verification in axios and react
body: <p>I'm trying to consume an API in my react application using axios. The API works over HTTPS with self signed certificate. So far I've got the following error when connecting:</p>
  
  <pre><code>net::ERR_INSECURE_RESPONSE
  bundle.js:65253 HTTP Failure in Axios Error: Network Error
      at createError (bundle.js:2188)
      at XMLHttpRequest.handleError (bundle.js:1717)
  </code></pre>
  
  <p>I tried the following but without success:</p>
  
  <pre><code>import axios from 'axios';
  
  const https = require('https');
  
  const agent = new https.Agent({
      rejectUnauthorized: false,
  });
  
  const client = axios.create({ //all axios can be used, shown in axios documentation
      baseURL: process.env.REACT_APP_API_URL,
      responseType: 'json',
      withCredentials: true,
      httpsAgent: agent
  });
  
  export default client;
  </code></pre>
  
  <p>Is there any way to disable the certificate verification? </p>