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
  • 1,003
  • 5
  • 12
  • 30

2 Answers2

1

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

Jason
  • 15,915
  • 3
  • 48
  • 72
1

https://npmjs.org/package/request

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