Guest User

Untitled

a guest
Mar 8th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. class << HTTP
  2. alias newobj new
  3. end
  4.  
  5. # Creates a new Net::HTTP object.
  6. # If +proxy_addr+ is given, creates an Net::HTTP object with proxy support.
  7. # This method does not open the TCP connection.
  8. def HTTP.new(address, port = nil, p_addr = nil, p_port = nil, p_user = nil, p_pass = nil)
  9. h = Proxy(p_addr, p_port, p_user, p_pass).newobj(address, port)
  10. h.instance_eval {
  11. @newimpl = ::Net::HTTP.version_1_2?
  12. }
  13. h
  14. end
Add Comment
Please, Sign In to add comment