D
D
Danil2016-07-12 12:45:02
JavaScript
Danil, 2016-07-12 12:45:02

How to send a POST request with nodejs?

There is nodejs + express. From it you need to make a POST request to a third-party API and get a response from there. How to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya Shatokhin, 2016-07-12
@Veneomin

https://www.npmjs.com/package/request

request.post({url:'http://service.com/upload', form: {key:'value'}}, function(err,httpResponse,body){ /* ... */ })

V
Vitaly, 2016-08-15
@vshvydky

https://github.com/request/request-promise if you love promises

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question