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

Allow PUT and PATCH method for upload route #167

Merged
merged 2 commits into from Mar 11, 2015

Conversation

giosh94mhz
Copy link
Contributor

The default routing strategy allow only POST as HTTP verb to upload files, but PUT is actually better for RESTful interfaces. For completeness, I've added also PATCH, which may be used when upload of file will alter existing resources.

While I was at it, I've removed deprecated use of _requirements for setting _methods; this will become a BC in symfony 3.0, so if this branch is not merged you can cherry-pick that commit.

This PR relate to issue #118 , and probably the two are mutually exclusive. Anyway, I cannot understand why and how one would use GET...

@giosh94mhz
Copy link
Contributor Author

I forgot to fix the tests. Now everything should pass (in both commit).

sheeep pushed a commit that referenced this pull request Mar 11, 2015
Allow PUT and PATCH method for upload route
@sheeep sheeep merged commit 593e54e into 1up-lab:master Mar 11, 2015
@sheeep
Copy link
Contributor

sheeep commented Mar 11, 2015

Anyway, I cannot understand why and how one would use GET...

Me neither, but PUT and PATCH are perfectly fine, thank you :)

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.

None yet

2 participants