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)
comment:5 Changed 5 years ago by
|Patch needs improvement:||set|