[W::Http] Request method : DELETE
We are currently building our RESTful API, trying to respect the standards.
We would like to use the DELETE method and it is not yet implemented in Wt.
There are only few things to change, could it be added to the next version ?
I can even provide you the files if you want.
Updated by Koen Deforche over 7 years ago
- Status changed from New to InProgress
- Assignee set to Koen Deforche
- Target version set to 3.3.0
This indeed seems like a small change which we might still slip in the 3.3.0 release.
If you have already a patch ready, that would be convenient indeed.
Updated by Thomas Saquet over 7 years ago
The attached file is a diff patch to add delete HTTP method to Wt.
I added a deleteRequest method to Client class. I had to add "Request" at the end because I could not use the reserved word delete. I did not know how you would put everything in order (deprecating get / post and add getRequest / postRequest or doing it another way) so i let it like that.
I added the header treatment previously dedicated to POST to PUT and DELETE since the content-length parameter is mandatory.
Moreover, there are many HTTP methods that are standard, non-standard or still in draft state (ref : http://annevankesteren.nl/2007/10/http-methods). I think it would be a good idea to add a custom behaviour. However it implies more changes, I can prepare that for a next release if you want.
Do not hesitate to contact me if you want me to change something.