Class: Net::HTTP

Inherits:
Object
  • Object
show all
Defined in:
lib/httparty/core_extensions.rb

Defined Under Namespace

Classes: Patch

Instance Method Summary collapse

Instance Method Details

#patch(path, data, initheader = nil, dest = nil, &block) ⇒ Object

:nodoc:



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/httparty/core_extensions.rb', line 4

def patch(path, data, initheader = nil, dest = nil, &block) #:nodoc:
  res = nil
  request(Patch.new(path, initheader), data) {|r|
    r.read_body dest, &block
    res = r
  }
  unless @newimpl
    res.value
    return res, res.body
  end
  res
end