#1 2017-10-10 08:36:30

CycleSoft
Member
Registered: 2013-01-18
Posts: 34

DELETE HTTP method parameters handling

Hi!
some time ago browsing the mORMot source code I spotted a way to switch between URL-encoded vs JSON body  way to send parameters to a HTTP DELETE method, or so it seemed to me :-), but unfortunately I no longer found it.

Can you confirm that such option exists, and if so how to use it ?

If it does not exists, is it easy doable ?

I'm asking for such an option because the client of the mORMot server I'm developing only can send parameters of a DELETE method in the body, not URL-encoded.

Thanks!

Guido Aspesani

Offline

#2 2017-10-10 09:37:07

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: DELETE HTTP method parameters handling

Do you mean by using application/x-www-form-urlencoded ?

It is currently supported only for POST methods, by now.

You may try to modify:

function TSQLRestServerURIContext.URIDecodeREST: boolean;
....
  if Method in [mPost,mDelete] then begin
...

If it works for you, I may commit it.

Offline

#3 2017-10-10 13:44:27

CycleSoft
Member
Registered: 2013-01-18
Posts: 34

Re: DELETE HTTP method parameters handling

Hi ab,
I'm digging a bit more into the problem, and seems a bit more complex than I thought (wrong assumptions by me), but not a mORMot related issue.

Sorry for wasting your time, thank you!

Last edited by CycleSoft (2017-10-10 13:44:45)

Offline

Board footer

Powered by FluxBB