Project

General

Profile

Actions

Bug #12724

closed

Net::HTTP#post_form and #get_response do not use ENV proxy as default

Added by aert (Aert van de Hulsbeek) over 7 years ago. Updated almost 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:77151]

Description

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.

Updated by jeremyevans0 (Jeremy Evans) almost 5 years ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0