Nodejs Post request socket hang up error solution

  • 2020-03-30 03:58:55
  • OfStack

By referring to the method of sending HTTP post request on nodejs official website, a function of simulating post submission is realized. Error actually using socket hang up.

It turned out that it was the request header setting that required the headers field information to be included in the send option (this also depends on the server, and may have been discarded for incomplete post headers).


Related articles: