Method: Gem::Net::HTTP#mkcol
- Defined in:
- lib/rubygems/vendor/net-http/lib/net/http.rb
#mkcol(path, body = nil, initheader = nil) ⇒ Object
Sends a MKCOL request to the server; returns an instance of a subclass of Gem::Net::HTTPResponse.
The request is based on the Gem::Net::HTTP::Mkcol object created from string path
, string body
, and initial headers hash initheader
.
data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
http.mkcol('/todos/1', data)
http = Gem::Net::HTTP.new(hostname)
2215 2216 2217 |
# File 'lib/rubygems/vendor/net-http/lib/net/http.rb', line 2215 def mkcol(path, body = nil, initheader = nil) request(Mkcol.new(path, initheader), body) end |