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

Implement version of Laravel's $request->query('key') #913

Open
1 task
garyburgmann opened this issue Oct 5, 2019 · 1 comment
Open
1 task

Implement version of Laravel's $request->query('key') #913

garyburgmann opened this issue Oct 5, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@garyburgmann
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Currently request.input('key') will return the query string params if GET, else POST body. Also, the nature of request.input('key') lacks an element of explicitness.

What do we currently have to do now?
As above.

Describe the solution you'd like
A modification of request.input('key'), to return query params if GET, else return body && query params for POST.
Also, addition of request.query('key') in order to make the intent of the programmer explicit.
Happy to take on this pull req. myself.

Describe alternatives you've considered
This could be amended by simply modifying request.input('key'), but in line with trying to match up to Laravel as much as possible, it is prudent to add request.query('key') at the same time.

  • Is this a breaking change?
    No.

Additional context
None

@garyburgmann garyburgmann added the enhancement New feature or request label Oct 5, 2019
@garyburgmann
Copy link
Contributor Author

it appears that request.all() is dropping the query params on POST too.
image

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

No branches or pull requests

1 participant