Project

General

Profile

Backport #6300 » 0001-Added-HTTP-method-PATCH.patch

isaacsanders (Isaac Sanders), 04/16/2012 01:15 AM

View differences:

lib/net/http.rb
# Net::HTTP::Head
# Net::HTTP::Post
# Net::HTTP::Put
# Net::HTTP::Patch
# Net::HTTP::Proppatch
# Net::HTTP::Lock
# Net::HTTP::Unlock
......
res
end
def patch(path, data, initheader = nil) #:nodoc:
res = request(Patch.new(path, initheader), data)
res.value unless @newimpl
res
end
# Sends a PROPPATCH request to the +path+ and gets a response,
# as an HTTPResponse object.
def proppatch(path, body, initheader = nil)
......
RESPONSE_HAS_BODY = true
end
class Patch < HTTPRequest
METHOD = 'PATCH'
REQUEST_HAS_BODY = true
RESPONSE_HAS_BODY = true
end
class Delete < HTTPRequest
METHOD = 'DELETE'
REQUEST_HAS_BODY = false
(1-1/2)