Vasanthakumar Vasanthakumar - 1 month ago 16
Java Question

Node JS with Java REST Api

is it possible to have node js interact (get & post) with Java REST Api? Can I get a sample code on how to do that?
Thanks in advance.

Answer Source

Yes it can, RESTful API is using the HTTP anyways, so you can just using the request[1] module from NPM and act like your Node app is an HTTP client and calling your Java API

[1] https://www.npmjs.com/package/request