doc/net-http/examples.rdoc in net-http-0.3.2 vs doc/net-http/examples.rdoc in net-http-0.4.0
- old
+ new
@@ -8,12 +8,13 @@
- https://jsonplaceholder.typicode.com.
- http://example.com.
Some examples also assume these variables:
- uri = URI('https://jsonplaceholder.typicode.com')
+ uri = URI('https://jsonplaceholder.typicode.com/')
uri.freeze # Examples may not modify.
hostname = uri.hostname # => "jsonplaceholder.typicode.com"
+ path = uri.path # => "/"
port = uri.port # => 443
So that example requests may be written as:
Net::HTTP.get(uri)