https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112014-02-23T06:04:02ZRuby Issue Tracking SystemRuby master - Feature #9527: make Net::HTTP.get_print not only to $stdout but to an IO as a parameterhttps://bugs.ruby-lang.org/issues/9527?journal_id=454312014-02-23T06:04:02Zsrawlins (Sam Rawlins)sam.rawlins@gmail.com
<ul></ul><p>I opened up an alternative to this request in <a class="issue tracker-2 status-1 priority-4 priority-default" title="Feature: Add HTTP#get block functionality to HTTP.get (Open)" href="https://bugs.ruby-lang.org/issues/9556">#9556</a>.</p>
<p>I really like your suggestion. It is very strange that HTTP.get_print only prints to $stdout. However, the method signature of HTTP.get_print,</p>
<pre><code>HTTP.get_print(uri_or_host, path = nil, port = nil)
</code></pre>
<p>makes it very awkward to add an optional IO handle. I think my vote would actually be to remove HTTP.get_print. It does not feel like it belongs in the standard library (and hasn't been updated since 2005), and the 5 lines of code could even just be moved into the RDoc for HTTP.get or a similar method.</p>