class Crapi::Net::HTTP
Net::HTTP
needs a shortcut instance method for PUT calls like it does for GET/DELETE/PATCH/POST.
Public Instance Methods
put(path, data, initheader = nil, dest = nil, &block)
click to toggle source
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.
@param path [String] @param data [String] @param initheader [Hash] @param dest [nil]
@return [Net::HTTPResponse]
@see docs.ruby-lang.org/en/trunk/Net/HTTP.html
# File lib/crapi/client.rb, line 357 def put(path, data, initheader = nil, dest = nil, &block) send_entity(path, data, initheader, dest, Put, &block) end