Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sailingwithsandeep opened this issue Mar 14, 2024 · 2 comments
Open

Comments

@sailingwithsandeep
Copy link

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
Copy link
Contributor

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

@sailingwithsandeep
Copy link
Author

Can i open PR for refactoring doc?

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants