class Net::HTTP::Protocol
Code taken from this commit: github.com/ruby/ruby/commit/ab70e53ac3b5102d4ecbe8f38d4f76afad29d37d#lib/net/http.rb
Public Instance Methods
patch(path, data, initheader = nil, dest = nil) { |body_segment| ... }
click to toggle source
Sends a PATCH request to the path
and gets a response, as an
HTTPResponse object.
# File lib/restclient/net_http_ext.rb, line 10 def patch(path, data, initheader = nil, dest = nil, &block) # :yield: +body_segment+ send_entity(path, data, initheader, dest, Patch, &block) end
send_entity(path, data, initheader, dest, type, &block)
click to toggle source
Executes a request which uses a representation and returns its body.
# File lib/restclient/net_http_ext.rb, line 16 def send_entity(path, data, initheader, dest, type, &block) res = nil request(type.new(path, initheader), data) {|r| r.read_body dest, &block res = r } unless @newimpl res.value return res, res.body end res end