Reputation: 923
The get to this route works fine.
But how do I take my route.get() and make it do a post? If the post is written in jquery, or express, or something else I don't care. Below I just used the jquery as an example.
router.get('/', function (req, res, next) {
var url = 'blabla'
$.post('anotherBlaBla'
, { app: url }
);
});
Upvotes: 0
Views: 745
Reputation: 923
const request = require('request');
var url = 'blabla';
request.post(
url
, { json: { api: url } }
, function (err, res, bdy) {
if (!err && res.statusCode == 200)
console.log(bdy)
}
);
Upvotes: 1