Skip to content

client "delete" method missing "data" and "json" parameters #1587

Discussion options

You must be logged in to vote

Is this on purpose?

Yes.

Can we consider adding the data and json parameters to the detele method of the client?

Probably not, no.

See our docs at https://www.python-httpx.org/compatibility/#request-body-on-http-methods and the HTTP RFC https://tools.ietf.org/html/rfc7231#section-4.3.5

A payload within a DELETE request message has no defined semantics;
sending a payload body on a DELETE request might cause some existing
implementations to reject the request.

So, DELETE requests with a body are not completely disallowed, but it's discouraged as a usage. For this reason we don't support it in the general .delete() API, but we do still allow for it if that's really what you intended.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@matletix
Comment options

@tomchristie
Comment options

Answer selected by tomchristie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants