Documenting differences between Client.post et Client.put
|Reported by:||thibaultj||Owned by:||nobody|
|Severity:||Normal||Keywords:||rest, put, testing|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
The testing documentation asserts that « Client.put() […] Acts just like Client.post() except with the PUT request method. ». However, there's a subtle difference in the manner django handles both methods.
When a requests comes with a PUT method, django won't process the request.POST variable, even if the content is url encoded.
However, I think there is a gap in documentation, since a user testing a RESTful web service will meet a WTF!? effect when using a PUT request.
So I tried to make the documentation clearer, by explaining this difference, and explaining the way to overcome the issue.
There is a pull request, but the patch is attached.
Change History (8)
Changed 3 years ago by thibaultj
comment:1 Changed 3 years ago by thibaultj
- Cc thibaultj added
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Type changed from Uncategorized to Cleanup/optimization
Changed 3 years ago by zsiciarz
comment:5 Changed 3 years ago by lrekucki
- Patch needs improvement set