Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2008-03-12
12:56 • Deleted ticket [862554ffff]: Provide PUT and DELETE support for http package... artifact: 06ac6b0c4a user: hobbs
2006-10-06
13:05 • Ticket [862554ffff]: 1 change artifact: d3223b6cda user: hobbs
2004-03-05
06:20 • Ticket [862554ffff]: 4 changes artifact: ac5e5f0223 user: patthoyts
2003-12-18
22:14 • New ticket [862554ffff]. artifact: c3d5144f85 user: nobody

Provide PUT and DELETE support for http package

Deleted862554ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 19 years ago
Descriptionplain2003-12-18 22:14:38
Currently, the http package in Tcl 8.4.4 only support 
GET POST and HEAD method. It will be useful to provide 
PUT and DELETE support. And the changes can be 
trivial. A simple solution is to have a "-method" option 
for http::geturl. Users can specify which HTTP method 
to use. For example, 

http::geturl http://abc.com/doc/1 -method DELETE

will send an HTTP DELETE request out.

The following are the changes made to make it work.
The changes are all in http::geturl proc. The changes 
are based on http 2.4.4

261c262 (this is to change the options list)
<           -validate -timeout -type}
---
>           -validate -timeout -type -method}

284a286
>     set hasMethod [info exists state(-method)]

404a407,410
>     }
>
>     if {$hasMethod} {
>     set how $state(-method)
patthoytsplain2004-03-05 06:20:18
Logged In: YES 
user_id=202636

This is pretty much what's been done in the http version
used for the tclfvs webdavfs. (Except that also has some
http/1.1 stuff too).
hobbs Ticket [862554ffff]: 1 change [History diff]2006-10-06 13:05:08
hobbsplain2008-03-12 12:56:05
Logged In: YES 
user_id=72656
Originator: NO

in core http v2.7 (8.5.2, 8.4.19)
Log in (anonymous is fine) to add a comment.