Class: Net::HTTP
- Inherits:
-
Object
- Object
- Net::HTTP
- Defined in:
- lib/postageapp/utils.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ HTTP
constructor
A new instance of HTTP.
-
#old_initialize ⇒ Object
Getting rid of the ‘warning: peer certificate won’t be verified in this SSL session’.
Constructor Details
#initialize(*args) ⇒ HTTP
Returns a new instance of HTTP.
26 27 28 29 30 |
# File 'lib/postageapp/utils.rb', line 26 def initialize(*args) old_initialize(*args) @ssl_context = OpenSSL::SSL::SSLContext.new @ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE end |
Instance Method Details
#old_initialize ⇒ Object
Getting rid of the ‘warning: peer certificate won’t be verified in this SSL session’
25 |
# File 'lib/postageapp/utils.rb', line 25 alias_method :old_initialize, :initialize |