1

I have Node.js server with Socket.IO, which communicate with Python server (Django).
I need to perform POST from the node.js server (on specific method) to the Django server.
I cannot use any jquery function because it require window document.

Any other idea how can i send data to the Django from Node.js with POST method and check if it success?

Thanks.

gabi
  • 953
  • 4
  • 11
  • 29

2 Answers2

1

You want to look at the HTTP package. Specifically use the ClientRequest class to issue the POST request

Jason
  • 15,750
  • 3
  • 47
  • 71
1

https://npmjs.org/package/request

request.post('http://service.com/script', {form:{key:'value'}}, function(err,response,body){...});
vodolaz095
  • 6,242
  • 4
  • 24
  • 41