Method: Net::HTTP#copy
- Defined in:
- lib/net/http.rb
#copy(path, initheader = nil) ⇒ Object
Sends a COPY request to the server; returns an instance of a subclass of Net::HTTPResponse.
The request is based on the Net::HTTP::Copy object created from string path and initial headers hash initheader.
http = Net::HTTP.new(hostname)
http.copy('/todos/1')
2201 2202 2203 |
# File 'lib/net/http.rb', line 2201 def copy(path, initheader = nil) request(Copy.new(path, initheader)) end |