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

docs(guides): add example how to parse query params for Bun.serve #11916

Closed
wants to merge 1 commit into from

Conversation

BitOfUniverse
Copy link

@BitOfUniverse BitOfUniverse commented Jun 17, 2024

What does this PR do?

Guide describes all basic routing logic, but it doesn't tell anything about query params.
I've added a small snippet to make this guide complete.

  • Documentation or TypeScript types (it's okay to leave the rest blank in this case)

@Araxeus
Copy link

Araxeus commented Jun 17, 2024

  1. Why the convoluted Object.fromEntries(searchParams.entries())?
    The example should be something basic like searchParams.get('token')

  2. The example now creates a URL twice for no reason (new URL(req.url))

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

Successfully merging this pull request may close these issues.

3 participants