{"id":4002,"date":"2016-05-01T19:19:44","date_gmt":"2016-05-01T19:19:44","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=4002"},"modified":"2016-05-01T19:19:44","modified_gmt":"2016-05-01T19:19:44","slug":"fixing-node-error-101057795error140770fcssl-routinesssl23_get_server_hellounknown-protocolopensslssls23_clnt-c794","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/fixing-node-error-101057795error140770fcssl-routinesssl23_get_server_hellounknown-protocolopensslssls23_clnt-c794\/","title":{"rendered":"Fixing node error: 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\\ssl\\s23_clnt.c:794:"},"content":{"rendered":"<p>If you try to make a a request in Node.js over HTTPS, you can get an error like this:<\/p>\n<pre>\n101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\\ssl\\s23_clnt.c:794:\n<\/pre>\n<p>This can occur if you set the port on the URL, forcing it to communicate over a non HTTPs port. <\/p>\n<p>For instance, in this example, port should be 443, or left out entirely:<\/p>\n<pre lang=\"javascript\">\nvar options = {\n  hostname: 'gateway-a.watsonplatform.net',\n  path: url + endpoint,\n  port: 80,\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application\/x-www-form-urlencoded',\n    'Content-Length': postData.length\n  }\n};\n                   \nrequest(options, function(res) {\n  ...\n});\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Fixing an HTTPs error in Node.js<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[9],"tags":[302,387,388],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/4002"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=4002"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/4002\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=4002"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=4002"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=4002"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}