Skip to content

Instantly share code, notes, and snippets.

Created Jan 24, 2009
What would you like to do?
package MyApp;
package MyApp::Request;
use strict;
use parent 'Catalyst::Request';
sub method {
my $self = shift;
return $self->NEXT::method(@_) if @_;
my $method = $self->NEXT::method;
return $method unless uc($method) eq 'POST';
my $overload = $self->param('_method') || $self->param('x-tunneled-method');
return $overload ? uc($overload) : $method;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment