I want to do the following, but I do not know if this is possible if he did not perform string manipulations in the URL. I want to get some parameter from url, I have some data that is transmitted in the mail data, but I need to get some information (user ID) from the URL:
- I use express
- I use post method
- My url is like:
http://www.mydomain.com/api/user/123456/test?v=1.0
I have the following code to get all mail requests:
var http = require('http');
var url = require('url') ;
exp.post('*', function(req, res, next) {
var queryObject = url.parse(req.url,true).query;
var parameter = req.param('name');
}
What am I missing?
thank
source
share