Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I write a Node.js request to 3rd party API?

Does anyone have an example of an API response being passed back from a http.request() made to a 3rd party back to my clientSever and written out to a clients browser?

I keep getting stuck in what I'm sure is simple logic. I'm using express from reading the docs it doesn't seem to supply an abstraction for this.

Thanks

like image 794
Denis Hoctor Avatar asked Mar 25 '11 12:03

Denis Hoctor


1 Answers

This example looks pretty similar to what you are trying to achieve (pure Node.js, no express):

http://blog.tredix.com/2011/03/partly-cloudy-nodejs-and-ifs.html

HTH

like image 176
arnebert Avatar answered Oct 04 '22 03:10

arnebert