Method: Gem::Net::HTTP#copy

Defined in:
lib/rubygems/vendor/net-http/lib/net/http.rb

#copy(path, initheader = nil) ⇒ Object

Sends a COPY request to the server; returns an instance of a subclass of Gem::Net::HTTPResponse.

The request is based on the Gem::Net::HTTP::Copy object created from string path and initial headers hash initheader.

http = Gem::Net::HTTP.new(hostname)
http.copy('/todos/1')


2201
2202
2203
# File 'lib/rubygems/vendor/net-http/lib/net/http.rb', line 2201

def copy(path, initheader = nil)
  request(Copy.new(path, initheader))
end