title: Error: unable to verify the first certificate in Node-Red
body: <p>I am trying to call RESTful service (out side of my domain) in a simple Node-Red flow.</p>
  
  <p>The flow is illustrated in the following diagram:
  <a href="https://i.stack.imgur.com/qvMGN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qvMGN.png" alt="enter image description here"></a></p>
  
  <p>The function for calling the service:</p>
  
  <pre><code>var data = {};
  data[“someparameter”] = “somevalue”;
  msg.method = "POST";
  msg.headers = { "Content-Type": "application/json" };
  msg.payload = JSON.stringify(data);
  msg.url = "https://myserviceip/myendpoint/mymethod”;
  return msg;
  </code></pre>
  
  <p>Nonetheless i get the following error:</p>
  
  <pre><code>"Error: unable to verify the first certificate : https://myserviceip/myendpoint/mymethod"
  </code></pre>
  
  <p>Setting the msg.rejectUnauthorized in the header to false did not work.</p>
  
  <pre><code>msg.rejectUnauthorized = false;  // to avoid the error but it does not work
  </code></pre>