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:



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/httparty/core_extensions.rb', line 12

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