uNetworking/uWebSockets.js

req.getQuery() is returning undefiend insteated of empty string

sailingwithsandeep opened this issue · 3 comments

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?

Docs are wrong. Undefined means missing, empty string means present but empty

Can i open PR for refactoring doc?

I am loving this project and implemented in current project as well. Would love to help.