I used https://github.com/mikeal/request to make REST API calls
When I make a request GETover HTTPS with the { strictSSL: false }specified parameters. I get the answer that I need, and everything is in order.
However, if I make a request POSTalso with strictSSL, I get an errorSELF_SIGNED_CERT_IN_CHAIN
Here is an example of what I used:
request.post({url: url, headers: headers, strictSSL: false}, function (err, response, body) {
});
Does anyone know why it works for queries GETand notPOST
source
share