Delete request with query params using the APIClient #8960
Unanswered
madjaqk
asked this question in
Question & Answer
Replies: 1 comment
-
Apparently in the next version (5.1?) but in any previous version, it seems only url encoding is supported for delete and any non GET method in fact |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a convenient way when using the
rest_framework.test.APIClient
to make a DELETE request with query parameters?my_client.delete("/url/", {"foo": "bar"})
seems to always encode the data in the request body, and I haven't seen any option that would override that.I know I can add the query params manually, something like
my_client.delete("/url/?" + urllib.parse.urlencode({"foo": "bar"})
, but that's a little awkward; I was hoping this would be possible with just theAPIClient
.Beta Was this translation helpful? Give feedback.
All reactions