★ wanayoo — archive 1999 https://github.com/slimphp/Slim/pull/2034Nouvelle recherche | Portail wanayoo
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

Reuse getParsedBodyParam for determining method override in POST body. #2034

Merged
merged 1 commit into from Nov 18, 2016

Conversation

@sbol-coolblue
Copy link
Contributor

@sbol-coolblue sbol-coolblue commented Nov 14, 2016

Makes getMethod() internally use getParsedBodyParam() for determining the value of _METHOD in the request body, for purposes of overriding the body.

Question though: wouldn't this type of method-juggling be more appropriately implemented as a middleware rather than living in the core Request object logic, so it becomes an opt-in behaviour?

@coveralls
Copy link

@coveralls coveralls commented Nov 14, 2016

Coverage Status

Coverage increased (+0.06%) to 97.256% when pulling 2742aa0 on sbol-coolblue:improvement/parsedBodyParam into 2f29cc2 on slimphp:3.x.

@akrabat
Copy link
Member

@akrabat akrabat commented Nov 14, 2016

Yes. _METHOD will certainly be moved to middleware for 4.0

@akrabat akrabat added this to the 3.6.0 milestone Nov 14, 2016
@akrabat akrabat merged commit 2742aa0 into slimphp:3.x Nov 18, 2016
3 checks passed
3 checks passed
Scrutinizer 1 new issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.06%) to 97.256%
Details
@akrabat
Copy link
Member

@akrabat akrabat commented Nov 18, 2016

Thanks.

@sbol-coolblue
Copy link
Contributor Author

@sbol-coolblue sbol-coolblue commented Nov 18, 2016

You're welcome, and thanks for accepting my little contribution!

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

Successfully merging this pull request may close these issues.

None yet

3 participants