in reply to Re: Struggling to understand making CGI::Application RESTFUL
in thread Struggling to understand making CGI::Application RESTFUL

Well ... PUT has been supported by CGI (and hence CGI::Application) since version 3.31 -- I know, it was the fine monks here that helped me create the patch! (REST Webservices and CGI.pm). There's probably a CGI::Application plugin to make it really easy but here's how I've been doing rest services with CGI::Application:

sub setup { my $self = shift; my $cgi = $self->query(); $self->start_mode( $cgi->request_method() ); $self->run_modes( 'PUT' => 'update', 'GET' => 'retrieve', 'POST' => 'create', 'DELETE' => 'delete', ); }

-derby

Replies are listed 'Best First'.
Re^3: Struggling to understand making CGI::Application RESTFUL
by Your Mother (Archbishop) on Jun 08, 2010 at 16:31 UTC

    The issue is client-side support and the HTML spec. Some browsers do the right thing now but it's not because they are supposed to as much as they are trying to bridge the gap.