lib/net/http/requests.rb in net-http-0.3.2 vs lib/net/http/requests.rb in net-http-0.4.0
- old
+ new
@@ -1,6 +1,6 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
# HTTP/1.1 methods --- RFC2616
# \Class for representing
# {HTTP method GET}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#GET_method]:
@@ -11,10 +11,12 @@
# req = Net::HTTP::Get.new(uri) # => #<Net::HTTP::Get GET>
# res = Net::HTTP.start(hostname) do |http|
# http.request(req)
# end
#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
# Properties:
#
# - Request body: optional.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: yes.
@@ -41,10 +43,12 @@
# req = Net::HTTP::Head.new(uri) # => #<Net::HTTP::Head HEAD>
# res = Net::HTTP.start(hostname) do |http|
# http.request(req)
# end
#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
# Properties:
#
# - Request body: optional.
# - Response body: no.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: yes.
@@ -73,10 +77,12 @@
# req.content_type = 'application/json'
# res = Net::HTTP.start(hostname) do |http|
# http.request(req)
# end
#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
# Properties:
#
# - Request body: yes.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: no.
@@ -106,10 +112,12 @@
# req.content_type = 'application/json'
# res = Net::HTTP.start(hostname) do |http|
# http.request(req)
# end
#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
# Properties:
#
# - Request body: yes.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: no.
@@ -132,10 +140,12 @@
# req = Net::HTTP::Delete.new(uri) # => #<Net::HTTP::Delete DELETE>
# res = Net::HTTP.start(hostname) do |http|
# http.request(req)
# end
#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
# Properties:
#
# - Request body: optional.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: no.
@@ -161,10 +171,12 @@
# req = Net::HTTP::Options.new(uri) # => #<Net::HTTP::Options OPTIONS>
# res = Net::HTTP.start(hostname) do |http|
# http.request(req)
# end
#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
# Properties:
#
# - Request body: optional.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: yes.
@@ -190,10 +202,12 @@
# req = Net::HTTP::Trace.new(uri) # => #<Net::HTTP::Trace TRACE>
# res = Net::HTTP.start(hostname) do |http|
# http.request(req)
# end
#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
# Properties:
#
# - Request body: no.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: yes.
@@ -222,10 +236,12 @@
# req.content_type = 'application/json'
# res = Net::HTTP.start(hostname) do |http|
# http.request(req)
# end
#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
# Properties:
#
# - Request body: yes.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: no.
@@ -255,10 +271,12 @@
# req = Net::HTTP::Propfind.new(uri) # => #<Net::HTTP::Propfind PROPFIND>
# res = Net::HTTP.start(hostname) do |http|
# http.request(req)
# end
#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
# Related:
#
# - Net::HTTP#propfind: sends +PROPFIND+ request, returns response object.
#
class Net::HTTP::Propfind < Net::HTTPRequest
@@ -276,10 +294,12 @@
# req = Net::HTTP::Proppatch.new(uri) # => #<Net::HTTP::Proppatch PROPPATCH>
# res = Net::HTTP.start(hostname) do |http|
# http.request(req)
# end
#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
# Related:
#
# - Net::HTTP#proppatch: sends +PROPPATCH+ request, returns response object.
#
class Net::HTTP::Proppatch < Net::HTTPRequest
@@ -297,10 +317,12 @@
# req = Net::HTTP::Mkcol.new(uri) # => #<Net::HTTP::Mkcol MKCOL>
# res = Net::HTTP.start(hostname) do |http|
# http.request(req)
# end
#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
# Related:
#
# - Net::HTTP#mkcol: sends +MKCOL+ request, returns response object.
#
class Net::HTTP::Mkcol < Net::HTTPRequest
@@ -318,10 +340,12 @@
# req = Net::HTTP::Copy.new(uri) # => #<Net::HTTP::Copy COPY>
# res = Net::HTTP.start(hostname) do |http|
# http.request(req)
# end
#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
# Related:
#
# - Net::HTTP#copy: sends +COPY+ request, returns response object.
#
class Net::HTTP::Copy < Net::HTTPRequest
@@ -339,10 +363,12 @@
# req = Net::HTTP::Move.new(uri) # => #<Net::HTTP::Move MOVE>
# res = Net::HTTP.start(hostname) do |http|
# http.request(req)
# end
#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
# Related:
#
# - Net::HTTP#move: sends +MOVE+ request, returns response object.
#
class Net::HTTP::Move < Net::HTTPRequest
@@ -360,10 +386,12 @@
# req = Net::HTTP::Lock.new(uri) # => #<Net::HTTP::Lock LOCK>
# res = Net::HTTP.start(hostname) do |http|
# http.request(req)
# end
#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
# Related:
#
# - Net::HTTP#lock: sends +LOCK+ request, returns response object.
#
class Net::HTTP::Lock < Net::HTTPRequest
@@ -380,9 +408,11 @@
# hostname = uri.hostname # => "example.com"
# req = Net::HTTP::Unlock.new(uri) # => #<Net::HTTP::Unlock UNLOCK>
# res = Net::HTTP.start(hostname) do |http|
# http.request(req)
# end
+#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Related:
#
# - Net::HTTP#unlock: sends +UNLOCK+ request, returns response object.
#