4

Is it possible for a node js application to make a call to another web application on Tomcat with a restful service call?

Regards

oxygenan
  • 1,023
  • 2
  • 12
  • 21

1 Answers1

7

Yes, a node.js application can do any sort of networking you would like including make a REST call to another server.

The request module makes this particularly easy, though it can also be done with just the plain http module with a bit more coding.

References:

How to make remote REST call inside Node.js? any CURL?

Calling a REST API from a NodeJS Script

Using Node.js to connect to a REST API

Calling REST API with node.js

Community
  • 1
  • 1
jfriend00
  • 683,504
  • 96
  • 985
  • 979
  • Thanks @jfriend00....is there any module available that can help me connect with a java programs... – oxygenan May 17 '15 at 04:32
  • @oxygenan - assuming your're talking about some sort of networking with a java program, then the fact that it is in java is irrelevant. What matters is what sort of networking protocol is it? HTTP? webSocket? A custom protocol? Some other standard protocol. You need to know the protocol and then you can look for a node.js library that talks that protocol. If it's REST, then that's just HTTP so the `request` module I mention in my answer is probably the one you want. If this provides the answer to your question, then please click the green checkmark to the left of the answer to accept it. – jfriend00 May 17 '15 at 04:40