title: certificate issue in nodejs https request
body: <p>I have the following error while making an https get request</p>
  
  <pre><code>{ Error: write EPROTO 101057795:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:openssl\ssl\s23_clnt.c:802:
  at _errnoException (util.js:992:11)
  at WriteWrap.afterWrite [as oncomplete] (net.js:864:14) code: 'EPROTO', errno: 'EPROTO', syscall: 'write' }
  </code></pre>
  
  <p>I am trying to make a request to corporate internal resource where proxy is not needed.</p>
  
  <pre><code>const request = require('request')
  var token= myToken
  request({
    method: 'post',
    url: 'https://myURL',
    data: {
      myData
    },
    headers: { 'Authorization': 'Bearer myToken' },
    agentOptions: {
      rejectUnauthorized: false,
    },
  }, function (error, response, body) {
  if(error){
    console.log('Error: ', error)
  } else {
    console.log(body)
  }
  })
  </code></pre>
  
  <p>I also have strict-ssl=false in my .npmrc.</p>
  
  <p>What I have notices is that I can make the same call curl with no issues. </p>
  
  <pre><code>curl -k1 -XPOST -H "Authorization: Bearer %TOKEN%" "https://%URL% -d @data,json -H "content-type: application/json"
  </code></pre>
  
  <p>-k1 option in curl seems to fix the issue with the certificate. </p>
  
  <p>What am I doing wrong in JavaScript?</p>