summaryrefslogtreecommitdiff
path: root/lib/net/http.rb
diff options
context:
space:
mode:
authorBurdetteLamar <[email protected]>2022-11-18 22:40:03 +0000
committergit <[email protected]>2022-11-19 15:33:28 +0000
commit909ea6b60d658b2a1c4a53be81b09642dcf86d4b (patch)
treeb3e167c851b91b4cef36aad0d0741358c2ec50d2 /lib/net/http.rb
parente6162728f6ca72e97805c7ee16b98f6639b2af11 (diff)
[ruby/net-http] About the Examples moved to separate file
https://github.com/ruby/net-http/commit/0512b5bfc9
Diffstat (limited to 'lib/net/http.rb')
-rw-r--r--lib/net/http.rb31
1 files changed, 1 insertions, 30 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb
index 7fd6f9d1b3..f07586e656 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -98,36 +98,7 @@ module Net #:nodoc:
#
# == About the Examples
#
- # Examples here assume that <tt>net/http</tt> has been required
- # (which also requires +uri+):
- #
- # require 'net/http'
- #
- # Many code examples here use these example websites:
- #
- # - https://jsonplaceholder.typicode.com.
- # - http://example.com.
- #
- # Some examples also assume these variables:
- #
- # uri = URI('https://jsonplaceholder.typicode.com')
- # uri.freeze # Examples may not modify.
- # hostname = uri.hostname # => "jsonplaceholder.typicode.com"
- # port = uri.port # => 443
- #
- # So that example requests may be written as:
- #
- # Net::HTTP.get(uri)
- # Net::HTTP.get(hostname, '/index.html')
- # Net::HTTP.start(hostname) do |http|
- # http.get('/todos/1')
- # http.get('/todos/2')
- # end
- #
- # An example that needs a modified URI first duplicates +uri+, then modifies:
- #
- # _uri = uri.dup
- # _uri.path = '/todos/1'
+ # :include: doc/net-http/examples.rdoc
#
# == URIs
#