[前][次][番号順一覧][スレッド一覧]

ruby-changes:42596

From: hsbt <ko1@a...>
Date: Fri, 22 Apr 2016 10:30:34 +0900 (JST)
Subject: [ruby-changes:42596] hsbt:r54670 (trunk): * lib/net/http.rb: Improve documentation for SSL requests via GET method.

hsbt	2016-04-22 11:27:10 +0900 (Fri, 22 Apr 2016)

  New Revision: 54670

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54670

  Log:
    * lib/net/http.rb: Improve documentation for SSL requests via GET method.
      [fix GH-1325][ci skip] Patch by @jsyeo

  Modified files:
    trunk/ChangeLog
    trunk/lib/net/http.rb
Index: lib/net/http.rb
===================================================================
--- lib/net/http.rb	(revision 54669)
+++ lib/net/http.rb	(revision 54670)
@@ -260,15 +260,20 @@ module Net   #:nodoc: https://github.com/ruby/ruby/blob/trunk/lib/net/http.rb#L260
   #
   #   uri = URI('https://secure.example.com/some_path?query=string')
   #
-  #   Net::HTTP.start(uri.host, uri.port,
-  #     :use_ssl => uri.scheme == 'https') do |http|
+  #   Net::HTTP.start(uri.host, uri.port, :use_ssl => true) do |http|
   #     request = Net::HTTP::Get.new uri
-  #
   #     response = http.request request # Net::HTTPResponse object
   #   end
   #
+  # Or if you simply want to make a GET request, you may pass in an URI
+  # object that has a HTTPS URL. Net::HTTP automatically turn on TLS
+  # verification if the URI object has a 'https' URI scheme.
+  #
+  #   uri = URI('https://example.com/')
+  #   Net::HTTP.get(uri) # => String
+  #
   # In previous versions of Ruby you would need to require 'net/https' to use
-  # HTTPS.  This is no longer true.
+  # HTTPS. This is no longer true.
   #
   # === Proxies
   #
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 54669)
+++ ChangeLog	(revision 54670)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Apr 22 11:27:03 2016  SHIBATA Hiroshi  <hsbt@r...>
+
+	* lib/net/http.rb: Improve documentation for SSL requests via GET method.
+	  [fix GH-1325][ci skip] Patch by @jsyeo
+
 Fri Apr 22 10:51:13 2016  SHIBATA Hiroshi  <hsbt@r...>
 
 	* lib/webrick/ssl.rb: Support to add SSLCiphers option.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]