summaryrefslogtreecommitdiff
path: root/lib/Net
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Net')
-rw-r--r--lib/Net/HTTP/Spore/Meta/Method.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Net/HTTP/Spore/Meta/Method.pm b/lib/Net/HTTP/Spore/Meta/Method.pm
index 2e55a89..f3d440f 100644
--- a/lib/Net/HTTP/Spore/Meta/Method.pm
+++ b/lib/Net/HTTP/Spore/Meta/Method.pm
@@ -17,7 +17,7 @@ subtype UriPath
=> where { $_ =~ m!^/! }
=> message {"path must start with /"};
-enum Method => qw(OPTIONS HEAD GET POST PUT DELETE TRACE);
+enum Method => qw(OPTIONS HEAD GET POST PUT DELETE TRACE PATCH);
subtype 'JSON::XS::Boolean' => as 'JSON::XS::Boolean';
subtype 'JSON::PP::Boolean' => as 'JSON::PP::Boolean';
@@ -144,7 +144,7 @@ sub wrap {
: delete $method_args{payload};
if ( $payload
- && ( $method->method !~ /^P(?:OS|U)T$/i ) )
+ && ( $method->method !~ /^(?:POST|PUT|PATCH)$/i ) )
{
die Net::HTTP::Spore::Response->new( 599, [],
{ error => "payload requires a PUT or POST method" },