Issue #12724 has been reported by Aert van de Hulsbeek.

----------------------------------------
Bug #12724: Net::HTTP#post_form and #get_response do not use ENV proxy as default
https://bugs.ruby-lang.org/issues/12724

* Author: Aert van de Hulsbeek
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: 2.3.1
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
`Net::HTTP#post_form` and `#get_response` use `HTTP.start`, without passing any proxy args to it. As a result, the ENV proxy is not used for these calls. 

I believe both calls should have the same default behaviour as the more verbose
```
   req = Net::HTTP::Post.new(url)
   http = Net::HTTP.new(url.host, url.port)
   req.set_form_data(params)
   response = http.request(req)
```
which does use the ENV proxy setting.

If this is not desirable, it would be good if this alternate default behaviour can be included in the `#post_form` and `#get_response` documentation.





-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>