[Solved] GET/POST function in Node.js [closed]


You can make GET or POST requests to node.js, in fact your browser sends a GET request in order to retrieve any HTML whatsoever..
I’m surprised that you have been able to deliver any given that you do not seem to grasp the concept of a GET request.

You can post data to node just the same as you would with a form in a PHP application.
You must then do something with that data in your Node and deliver the appropriate response back to the browser.
You could also use AJAX to send data back and forth to node ‘in the background’ that is, without the browser navigating to a new page.
I suggest you do some reading. At least learn about the HTTP protocol before asking questions that really demonstrate your lack of basic understanding of the technologies you have mentioned.
HTTP Protocol

1

solved GET/POST function in Node.js [closed]