lib/flexirest/connection.rb in flexirest-1.2.13 vs lib/flexirest/connection.rb in flexirest-1.2.14
- old
+ new
@@ -55,9 +55,21 @@
sign_request(req, options[:api_auth])
end
end
end
+ def patch(path, data, options={})
+ set_defaults(options)
+ make_safe_request(path) do
+ @session.patch(path) do |req|
+ set_per_request_timeout(req, options) if options[:timeout]
+ req.headers = req.headers.merge(options[:headers])
+ req.body = data
+ sign_request(req, options[:api_auth])
+ end
+ end
+ end
+
def post(path, data, options={})
set_defaults(options)
make_safe_request(path) do
@session.post(path) do |req|
set_per_request_timeout(req, options) if options[:timeout]