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

Added small tip regarding query params #538

Merged
merged 2 commits into from Aug 6, 2020
Merged

Conversation

@clsource
Copy link
Contributor

@clsource clsource commented Aug 5, 2020

To clarify a little bit between the difference of req.params.get and req.query.

!!! tip
If you want to get params like /hello/?name=foo you will need to use Vapor's Content APIs to handle URL encoded data in the URL's query string. Example let name: String? = req.query["name"]. See Content reference for more details.

Copy link
Member

@0xTim 0xTim left a comment

Just a little tidy up and it's good to go I think!

4.0/docs/routing.md Outdated Show resolved Hide resolved
Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>
@0xTim
0xTim approved these changes Aug 6, 2020
Copy link
Member

@0xTim 0xTim left a comment

LGTM - thanks!

@0xTim 0xTim merged commit a0bfa25 into vapor:master Aug 6, 2020
@tanner0101 tanner0101 added this to Awaiting Review in Vapor 4 via automation Aug 6, 2020
@tanner0101 tanner0101 added the updates label Aug 6, 2020
@tanner0101 tanner0101 moved this from Awaiting Review to Done in Vapor 4 Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Vapor 4
  
Done
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.