124
rated 0 times
[
130]
[
6]
/ answers: 1 / hits: 29898
/ 10 Years ago, tue, november 18, 2014, 12:00:00
How can I parse a url?
site.com:8080/someFile.txt?attr=100
or
site.com:8080/someFile.txt/?attr=100
I need to get someFile.txt
, where is a file name I set by myself as the format (txt or some other).
UPDATE
I tried
var path = url.parse(req.url).path;
But I still cannot get the path (someFile.txt
).
More From » node.js