Add support for HTTP PATCH for body_data
Peter Mottram [Mon, 30 Jan 2017 18:03:24 +0000 (19:03 +0100)]
lib/Catalyst/Request.pm

index 1306b94..e4cb5c2 100644 (file)
@@ -123,7 +123,7 @@ sub _build_body_data {
 
     # Not sure if these returns should not be exceptions...
     my $content_type = $self->content_type || return;
-    return unless ($self->method eq 'POST' || $self->method eq 'PUT');
+    return unless ($self->method eq 'POST' || $self->method eq 'PUT' || $self->method eq 'PATCH');
 
     my ($match) = grep { $content_type =~/$_/i }
       keys(%{$self->data_handlers});