Dear all,
I have to call an API which model an HTTP DELETE operation based on the body of the request.
It looks like currently http:send-request is not allowing body to be present ("Body not expected for method DELETE.").
I feel that this is bit too restrictive interpretation of the spec which states (as far as I recall) that there is no defined semantic for the operation but not that it is forbidden.
Is there any possibility to relax this behaviour and allow for bodies in DELETE calls? [1]
Thank you very much.
Marco.
[1] https://github.com/BaseXdb/basex/blob/382c8097afb1ec5bac1e9511a2287686c33f66...
Hi Marco,
The error is basically raised because that's required by the spec [1].
But it's right that the RFC2616 doesn't explicitly forbid DELETE requests with bodies, so we could possibly get rid of the check.
So I guess you’ve stumbled upon an API that expects a payload with DELETE?
Cheers Christian
[1] http://expath.org/spec/http-client#d2e104
Marco Lettere m.lettere@gmail.com schrieb am Sa., 12. Juni 2021, 11:48:
Dear all,
I have to call an API which model an HTTP DELETE operation based on the body of the request.
It looks like currently http:send-request is not allowing body to be present ("Body not expected for method DELETE.").
I feel that this is bit too restrictive interpretation of the spec which states (as far as I recall) that there is no defined semantic for the operation but not that it is forbidden.
Is there any possibility to relax this behaviour and allow for bodies in DELETE calls? [1]
Thank you very much.
Marco.
[1]
https://github.com/BaseXdb/basex/blob/382c8097afb1ec5bac1e9511a2287686c33f66...
So I guess you’ve stumbled upon an API that expects a payload with DELETE?
Yes Christian, trying to delete an application role association to a user on the Keycloak REST APIs requires the role to be passed as JSON object in the DELETE body [1].
So at the moment I'm able to add roles to a user but I cannot change them because I'm unabale to remove one.
Telling just because you asked ;-)
Thanks a lot anyway for your attention.
[1] https://www.keycloak.org/docs-api/11.0/rest-api/index.html#_client_role_mapp...
Cheers Christian
[1] http://expath.org/spec/http-client#d2e104 http://expath.org/spec/http-client#d2e104
Marco Lettere <m.lettere@gmail.com mailto:m.lettere@gmail.com> schrieb am Sa., 12. Juni 2021, 11:48:
Dear all, I have to call an API which model an HTTP DELETE operation based on the body of the request. It looks like currently http:send-request is not allowing body to be present ("Body not expected for method DELETE."). I feel that this is bit too restrictive interpretation of the spec which states (as far as I recall) that there is no defined semantic for the operation but not that it is forbidden. Is there any possibility to relax this behaviour and allow for bodies in DELETE calls? [1] Thank you very much. Marco. [1] https://github.com/BaseXdb/basex/blob/382c8097afb1ec5bac1e9511a2287686c33f669d/basex-core/src/main/java/org/basex/util/http/HttpRequestParser.java <https://github.com/BaseXdb/basex/blob/382c8097afb1ec5bac1e9511a2287686c33f669d/basex-core/src/main/java/org/basex/util/http/HttpRequestParser.java>
Grazie, Marco.
You convinced me there is no benefit in keeping the restriction (and it we didn’t add it to the draft of version 2 of the spec either [1]). I’ve just uploaded a new snapshot [2]; I hope it keeps you going.
Ciao, Christian.
[1] https://expath.github.io/expath-cg/specs/http-client-2/ [2] https://files.basex.org/releases/latest/
So I guess you’ve stumbled upon an API that expects a payload with DELETE?
Yes Christian, trying to delete an application role association to a user on the Keycloak REST APIs requires the role to be passed as JSON object in the DELETE body [1].
So at the moment I'm able to add roles to a user but I cannot change them because I'm unabale to remove one.
Telling just because you asked ;-)
Thanks a lot anyway for your attention.
[1] https://www.keycloak.org/docs-api/11.0/rest-api/index.html#_client_role_mapp...
Cheers Christian
[1] http://expath.org/spec/http-client#d2e104
Marco Lettere m.lettere@gmail.com schrieb am Sa., 12. Juni 2021, 11:48:
Dear all,
I have to call an API which model an HTTP DELETE operation based on the body of the request.
It looks like currently http:send-request is not allowing body to be present ("Body not expected for method DELETE.").
I feel that this is bit too restrictive interpretation of the spec which states (as far as I recall) that there is no defined semantic for the operation but not that it is forbidden.
Is there any possibility to relax this behaviour and allow for bodies in DELETE calls? [1]
Thank you very much.
Marco.
[1] https://github.com/BaseXdb/basex/blob/382c8097afb1ec5bac1e9511a2287686c33f66...
Thank you! I didn't want to disturb your weekend though.... Top quality BaseX service! 😁🤩
Il sab 12 giu 2021, 16:37 Christian Grün christian.gruen@gmail.com ha scritto:
Grazie, Marco.
You convinced me there is no benefit in keeping the restriction (and it we didn’t add it to the draft of version 2 of the spec either [1]). I’ve just uploaded a new snapshot [2]; I hope it keeps you going.
Ciao, Christian.
[1] https://expath.github.io/expath-cg/specs/http-client-2/ [2] https://files.basex.org/releases/latest/
So I guess you’ve stumbled upon an API that expects a payload with
DELETE?
Yes Christian, trying to delete an application role association to a
user on the Keycloak REST APIs requires the role to be passed as JSON object in the DELETE body [1].
So at the moment I'm able to add roles to a user but I cannot change
them because I'm unabale to remove one.
Telling just because you asked ;-)
Thanks a lot anyway for your attention.
[1]
https://www.keycloak.org/docs-api/11.0/rest-api/index.html#_client_role_mapp...
Cheers Christian
[1] http://expath.org/spec/http-client#d2e104
Marco Lettere m.lettere@gmail.com schrieb am Sa., 12. Juni 2021,
11:48:
Dear all,
I have to call an API which model an HTTP DELETE operation based on the body of the request.
It looks like currently http:send-request is not allowing body to be present ("Body not expected for method DELETE.").
I feel that this is bit too restrictive interpretation of the spec which states (as far as I recall) that there is no defined semantic for the operation but not that it is forbidden.
Is there any possibility to relax this behaviour and allow for bodies in DELETE calls? [1]
Thank you very much.
Marco.
[1]
https://github.com/BaseXdb/basex/blob/382c8097afb1ec5bac1e9511a2287686c33f66...
Indeed - common sense & top flexibility!
Am Samstag, 12. Juni 2021, 16:45:05 MESZ hat Marco Lettere m.lettere@gmail.com Folgendes geschrieben:
Thank you! I didn't want to disturb your weekend though.... Top quality BaseX service! 😁🤩 Il sab 12 giu 2021, 16:37 Christian Grün christian.gruen@gmail.com ha scritto:
Grazie, Marco.
You convinced me there is no benefit in keeping the restriction (and it we didn’t add it to the draft of version 2 of the spec either [1]). I’ve just uploaded a new snapshot [2]; I hope it keeps you going.
Ciao, Christian.
[1] https://expath.github.io/expath-cg/specs/http-client-2/ [2] https://files.basex.org/releases/latest/
So I guess you’ve stumbled upon an API that expects a payload with DELETE?
Yes Christian, trying to delete an application role association to a user on the Keycloak REST APIs requires the role to be passed as JSON object in the DELETE body [1].
So at the moment I'm able to add roles to a user but I cannot change them because I'm unabale to remove one.
Telling just because you asked ;-)
Thanks a lot anyway for your attention.
[1] https://www.keycloak.org/docs-api/11.0/rest-api/index.html#_client_role_mapp...
Cheers Christian
[1] http://expath.org/spec/http-client#d2e104
Marco Lettere m.lettere@gmail.com schrieb am Sa., 12. Juni 2021, 11:48:
Dear all,
I have to call an API which model an HTTP DELETE operation based on the body of the request.
It looks like currently http:send-request is not allowing body to be present ("Body not expected for method DELETE.").
I feel that this is bit too restrictive interpretation of the spec which states (as far as I recall) that there is no defined semantic for the operation but not that it is forbidden.
Is there any possibility to relax this behaviour and allow for bodies in DELETE calls? [1]
Thank you very much.
Marco.
[1] https://github.com/BaseXdb/basex/blob/382c8097afb1ec5bac1e9511a2287686c33f66...
…and exceptional kudos! ありがとう.
Hans-Juergen Rennau hrennau@yahoo.de schrieb am Sa., 12. Juni 2021, 16:56:
Indeed - common sense & top flexibility!
Am Samstag, 12. Juni 2021, 16:45:05 MESZ hat Marco Lettere < m.lettere@gmail.com> Folgendes geschrieben:
Thank you! I didn't want to disturb your weekend though.... Top quality BaseX service! 😁🤩
Il sab 12 giu 2021, 16:37 Christian Grün christian.gruen@gmail.com ha scritto:
Grazie, Marco.
You convinced me there is no benefit in keeping the restriction (and it we didn’t add it to the draft of version 2 of the spec either [1]). I’ve just uploaded a new snapshot [2]; I hope it keeps you going.
Ciao, Christian.
[1] https://expath.github.io/expath-cg/specs/http-client-2/ [2] https://files.basex.org/releases/latest/
So I guess you’ve stumbled upon an API that expects a payload with
DELETE?
Yes Christian, trying to delete an application role association to a
user on the Keycloak REST APIs requires the role to be passed as JSON object in the DELETE body [1].
So at the moment I'm able to add roles to a user but I cannot change
them because I'm unabale to remove one.
Telling just because you asked ;-)
Thanks a lot anyway for your attention.
[1]
https://www.keycloak.org/docs-api/11.0/rest-api/index.html#_client_role_mapp...
Cheers Christian
[1] http://expath.org/spec/http-client#d2e104
Marco Lettere m.lettere@gmail.com schrieb am Sa., 12. Juni 2021,
11:48:
Dear all,
I have to call an API which model an HTTP DELETE operation based on the body of the request.
It looks like currently http:send-request is not allowing body to be present ("Body not expected for method DELETE.").
I feel that this is bit too restrictive interpretation of the spec which states (as far as I recall) that there is no defined semantic for the operation but not that it is forbidden.
Is there any possibility to relax this behaviour and allow for bodies in DELETE calls? [1]
Thank you very much.
Marco.
[1]
https://github.com/BaseXdb/basex/blob/382c8097afb1ec5bac1e9511a2287686c33f66...
basex-talk@mailman.uni-konstanz.de