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_mappings_resource
>
> 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/382c8097afb1ec5bac1e9511a2287686c33f669d/basex-core/src/main/java/org/basex/util/http/HttpRequestParser.java
>>