Class: Net::HTTP
- Inherits:
-
Object
- Object
- Net::HTTP
- Defined in:
- lib/crapi/client.rb
Overview
Net::HTTP needs a shortcut instance method for PUT calls like it does for GET/DELETE/PATCH/POST.
Instance Method Summary collapse
-
#put(path, data, initheader = nil, dest = nil, &block) ⇒ Net::HTTPResponse
Convenience PUT method monkey-patched into Net::HTTP.
Instance Method Details
#put(path, data, initheader = nil, dest = nil, &block) ⇒ Net::HTTPResponse
Convenience PUT method monkey-patched into Net::HTTP.
Net::HTTP provides handy methods for DELETE, GET, HEAD, OPTIONS, PATCH, and POST, but not PUT, so we have to monkey-patch one in. The parameters listed below were chosen to match those in use for the other Net::HTTP request methods in both name and meaning.
353 354 355 |
# File 'lib/crapi/client.rb', line 353 def put(path, data, initheader = nil, dest = nil, &block) send_entity(path, data, initheader, dest, Put, &block) end |