TimeStamp
struct
Raised when encoding is invalid.
Class for representing HTTP method POST:
require 'net/http' uri = URI('http://example.com') hostname = uri.hostname # => "example.com" uri.path = '/posts' req = Net::HTTP::Post.new(uri) # => #<Net::HTTP::Post POST> req.body = '{"title": "foo","body": "bar","userId": 1}' req.content_type = 'application/json' res = Net::HTTP.start(hostname) do |http| http.request(req) end
Properties:
Request body: yes.
Response body: yes.
Safe: no.
Idempotent: no.
Cacheable: yes.
Related:
Net::HTTP.post
: sends POST
request, returns response object.
Net::HTTP#post
: sends POST
request, returns response object.
Class for representing WebDAV method MKCOL:
require 'net/http' uri = URI('http://example.com') hostname = uri.hostname # => "example.com" req = Net::HTTP::Mkcol.new(uri) # => #<Net::HTTP::Mkcol MKCOL> res = Net::HTTP.start(hostname) do |http| http.request(req) end
Related:
Net::HTTP#mkcol
: sends MKCOL
request, returns response object.
Class for representing WebDAV method COPY:
require 'net/http' uri = URI('http://example.com') hostname = uri.hostname # => "example.com" req = Net::HTTP::Copy.new(uri) # => #<Net::HTTP::Copy COPY> res = Net::HTTP.start(hostname) do |http| http.request(req) end
Related:
Net::HTTP#copy
: sends COPY
request, returns response object.
Switch
that can omit argument.
Indicates that the DNS
response was unable to be decoded.
Indicates that the DNS
request was unable to be encoded.
Generates a index files for use as a gem server.
See ‘gem help generate_index`