title: how to fetch data from a site which gives NET::ERR_CERT_AUTHORITY_INVALID
body: <p>How can I fetch data from a site which gives <code>NET::ERR_CERT_AUTHORITY_INVALID</code> using fetch API.  I used this but got <code>net::ERR_INSECURE_RESPONSE</code>
  Below is my code</p>
  
  <pre><code>let header = new Headers({
    'Access-Control-Allow-Origin':'',
    'Content-Type': 'multipart/form-data'
    });
  let username="***";
  let password="***";
  let url ="***";
  let sentData={
      method:'POST',
      mode: 'cors',
      header: header
  };
  return new Promise((reslove,reject)=&gt;{
      fetch(url, sentData)
          .then(response=&gt; response.json())
          .then(responseText=&gt;{
  
              console.log(responseText);
  
          }).catch(err=&gt;{
          console.log(err);
      });
  }).catch(err =&gt; {
          console.log(err);
      });
  </code></pre>
  
  <p>I can't share the url ,username and pwd.</p>