Error: socket hang up using node v0.12.0

后端 未结 1 829
刺人心
刺人心 2021-01-23 20:30

I\'m trying to perform a very simple HTTP POST with Node:

var querystring = require(\'querystring\');
var http = require(\'http\');

var postData = querystring.s         


        
相关标签:
1条回答
  • 2021-01-23 21:02

    I see that you are are making a request to a secure server. You probably should be using the request method of the https object instead.

    In fact, I was able to re-create the problem using the http object and when I simply used the https object I was able to get a response without the socket closing.

    0 讨论(0)
提交回复
热议问题