Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Node https request to server with invalid SSL certs
// use this when you can curl an https server, but node request() will return 'econnreset: socket hang up'
var options = {
url: 'https://some/site',
method: 'POST',
// these 3 lines matter
strictSSL: false,
secureProtocol: 'TLSv1_method',
rejectUnhauthorized: false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.