Class: Net::HTTP

Inherits:
Protocol
  • Object
show all
Defined in:
lib/htty.rb,
lib/htty/http_patch.rb

Defined Under Namespace

Classes: Patch

Instance Method Summary collapse

Instance Method Details

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



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/htty/http_patch.rb', line 17

def patch(path, data, initheader, &block)
  res = nil
  request(Patch.new(path, initheader), data) do |r|
    r.read_body(nil, &block)
    res = r
  end
  unless @newimpl
    res.value
    return res, res.body
  end
  res
end