-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
The Delete Room API should use the http DELETE method, not POST #9032
Comments
While you're probably right that the reasoning for making it |
I agree that it's not worth breaking any applications using the API, however:
|
I'm don't have strong opinions here. cc @dklimpel |
I have no opinion on this. |
allow DELETE and deprecate POST? |
Would definitely be my suggestion. |
This was going to be my suggestion as well. Note also that this is an admin API so the spec is somewhat...unrelated. We would accept a PR for this if it was backwards compatible, but the core team likely will not have a chance to work on this. |
I could definitely work on this sometime in this coming week, most likely, though I've never contributed to this particular project before :) |
Maybe allow |
Part of matrix-org#9032 Support the delete of a room through DELETE request and mark previous request as deprecated through documentation. Signed-off-by: Thibault Ferrante <[email protected]>
Part of matrix-org#9032 As there is two different endpoints with two differents method, an intermediate function avoid the code duplication. This function should be removed when the deprecated API is removed. Signed-off-by: Thibault Ferrante <[email protected]>
Per the HTTP spec this is undefined behaviour and existing implementations - including proxies - are explicitly called out as potentially rejecting such a DELETE request. See #11698 (comment) for expansion on that /cc @PaarthShah |
With roots in this suggestion by @richvdh, the current Delete Room API uses
POST /_synapse/admin/v1/rooms/<room_id>/delete
instead ofDELETE /_synapse/admin/v1/rooms/<room_id>
, on the logic that DELETE should not have a request body.This logic is incorrect, as better detailed by this stackoverflow answer, but in short, the spec supports it, and the matrix APIs already have other instances of
DELETE
being used with a request body.https://matrix.org/docs/spec/client_server/latest#delete-matrix-client-r0-devices-deviceid
The text was updated successfully, but these errors were encountered: