I try to write a server which will manage some get requests like this: GET http://some-server.aa:1337/action?param1=1000¶m2=1000 But I can't parse param1 and param2 from url because param2 not appear on server part.
app.get('/action', function(req, res) {
var parts = url.parse(req.url, true);
var query = parts.query;
console.log('keys: '+Object.keys(query)); //output: keys: caller
console.log('url: '+parts.path); // output: url:/action?param1=1000
});
I use express, url, and path modules. if I'l be able to receive on server full url, then
But before this, I need to be able to receive full path from req. Have any ideas?
UPD
how it's look from my side:
https://dl.dropboxusercontent.com/u/12720156/nodejsbug.png