req.getQuery() is returning undefiend insteated of empty string
sailingwithsandeep opened this issue · 3 comments
sailingwithsandeep commented
as stated in docs it should return empty string
/** Returns the raw querystring (the part of URL after ? sign) or empty string. */
getQuery() : string;
Code:
get('/', (res, req) => {
console.log(req.getQuery());
res.writeStatus('201 Created').end("It's been real, Cupcake. Thanks. For everything! 🐣");
})
Am i doing something wrong here?
uNetworkingAB commented
Docs are wrong. Undefined means missing, empty string means present but empty
sailingwithsandeep commented
Can i open PR for refactoring doc?
I am loving this project and implemented in current project as well. Would love to help.