javascript - Invoke HTTP GET and POST request without pages using Node.js + Express -
I have a node running with Expressjs. JS is the app. I have a typical setup now, see JET files and Root JS files to process GET and POST requests. The example is as follows: This works, I can take GET and post requests. For example, one button can apply the POST operation. My question is how can I use a different script or NPM module, without any kind of GET and POST requests, through ideas? Ideally, I will have something like this: with parameters req.body.from and req.body.to. Is similar to Basically, I'm looking without using the page to emulate information from the page. I am new to node. And really will appreciate some help. Please tell me that I have not understood anything enough and I will try. Thanks router. Post ('/ posting', function (rik, ridge) {// element from true Z. view itself var a = req.body.from; Var two = req.body.to; // something to do}); Router.get ('/ getaction', function (req, res) {// is one of the only elements from the actual Z-view var a = req.body.from; var two = req.body.to; // something is});
somescript-get & lt; Param1 & gt; somescript-post & lt; Param1 & gt; & Lt; Param2 & gt;
Comments
Post a Comment