Misc #6299 » 0001-Added-the-HTTP-PATCH-method.patch
| 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
|
||
|
# Sends a PATCH request to the +path+ and gets a response,
|
||
|
# as an HTTPResponse object.
|
||
|
def patch(path, body, initheader = nil)
|
||
|
request(Patch.new(path, initheader), body)
|
||
|
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
|
||