diff options
author | James Broadhead <james.broadhead@mongodb.com> | 2017-05-08 13:56:34 -0400 |
---|---|---|
committer | James Broadhead <james.broadhead@mongodb.com> | 2017-05-08 13:59:31 -0400 |
commit | 788bbff36108a6952da19538150e685ae45694d1 (patch) | |
tree | 8086d52c8a7942431d7a35c0356eb8219f9e6299 /lib/chef/http | |
parent | 0ad389f48d43ebfc4347c41a3573ee855993c5f1 (diff) | |
download | chef-788bbff36108a6952da19538150e685ae45694d1.tar.gz |
Add support for HTTP PATCH requests
Signed-off-by: James Broadhead <james.broadhead@mongodb.com>
Diffstat (limited to 'lib/chef/http')
-rw-r--r-- | lib/chef/http/http_request.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/http/http_request.rb b/lib/chef/http/http_request.rb index 20c46aaa8d..7fc1acb889 100644 --- a/lib/chef/http/http_request.rb +++ b/lib/chef/http/http_request.rb @@ -49,6 +49,7 @@ class Chef ENCODING_GZIP_DEFLATE = "gzip;q=1.0,deflate;q=0.6,identity;q=0.3".freeze GET = "get".freeze + PATCH = "patch".freeze PUT = "put".freeze POST = "post".freeze DELETE = "delete".freeze @@ -161,6 +162,8 @@ class Chef Net::HTTP::Post.new(req_path, headers) when PUT Net::HTTP::Put.new(req_path, headers) + when PATCH + Net::HTTP::Patch.new(req_path, headers) when DELETE Net::HTTP::Delete.new(req_path, headers) when HEAD |