dmzen has asked for the wisdom of the Perl Monks concerning the following question:

Hello All-
In the process of doing a project as part of my internship I was given the task of implementing a specific type of web client. We decided that in order for the web client to perform all of the duties correctly, we needed to use the new methods outlined in HTTP 1.1 (to be exact put, trace, and delete).

After looking around I noticed that LWP does support PUT, but I cant seem to find anything that supports the TRACE and DELETE methods. Any help out there?

Thanks in advance.

Replies are listed 'Best First'.
Re: HTTP 1.1 (trace, delete) Method help
by valdez (Monsignor) on Mar 02, 2003 at 17:38 UTC

    Given this description from RFC 2616:

    The TRACE method is used to invoke a remote, application-layer loop- back of the request message. The final recipient of the request SHOULD reflect the message received back to the client as the entity-body of a 200 (OK) response.

    I think it should be fairly simple to extend HTTP::Request::Common and add a TRACE method. A quick and dirty example:

    $ua = LWP::UserAgent->new; $res = $ua->request(HTTP::Request::Common::_simple_req('TRACE', 'http: +//localhost/')); if ($res->is_success) { print "content is ", $res->content; } else { print '$res is ', $res->message, "\n"; }

    I haven't a clue about DELETE method, mostly because it isn't supported natively by Apache and I don't know how to test it. Any suggestions from other monks?

    Ciao, Valerio

Re: HTTP 1.1 (trace, delete) Method help
by Limbic~Region (Chancellor) on Mar 02, 2003 at 17:15 UTC
    dmzen,
    HTTP::Lite claims to have a toggle option for HTTP 1.1 support - it is off by default.

    Cheers - L~R

    Update: HTTP::MHTTP also has some 1.1 support, but probably doesn't have everything you are after.
    I found this web site that shows the latest attempt at adding 1.1 support and can be downloaded here
    You might have to splice things together. - L~R