Project

General

Profile

Actions

Feature #1675

closed

[W::Http] Request method : DELETE

Added by Anonymous about 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
02/06/2013
Due date:
% Done:

0%

Estimated time:

Description

Hello,

We are currently building our RESTful API, trying to respect the standards.

http://en.wikipedia.org/wiki/Representational_state_transfer#RESTful_web_services

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.

Regards,

Thomas


Files

wt_3_3_0_http_patch_delete (3.32 KB) wt_3_3_0_http_patch_delete Thomas Saquet, 02/14/2013 05:27 PM
Actions #1

Updated by Koen Deforche about 11 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
  • Target version set to 3.3.0

Hey Thomas,

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.

Regards,

koen

Actions #2

Updated by Thomas Saquet about 11 years ago

Hello Koen,

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.

Regards,

Thomas

Actions #3

Updated by Koen Deforche about 11 years ago

  • Status changed from InProgress to Resolved

Hey Thomas,

This looks fine to me. I applied as is. I have no special feeling about the deleteRequest() method --- it is syntactic sugar for the request() method anyway.

Regards,

koen

Actions #4

Updated by Thomas Saquet about 11 years ago

Hello Koen,

Great :)

What about the custom behaviour ? Should I get it ready for the next release ?

Thank you !

Regards,

Thomas

Actions #5

Updated by Koen Deforche about 11 years ago

Hey Thomas,

Yes we should allow flexibility here, and we are open for any changes needed.

Regards,

koen

Actions #6

Updated by Koen Deforche about 11 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF