Class: PXMyPortal::HTTPClient
- Inherits:
-
Object
- Object
- PXMyPortal::HTTPClient
- Extended by:
- Forwardable
- Defined in:
- lib/pxmyportal/http_client.rb
Instance Method Summary collapse
-
#initialize(debug: false, logger:) ⇒ HTTPClient
constructor
A new instance of HTTPClient.
- #start ⇒ Object
Constructor Details
#initialize(debug: false, logger:) ⇒ HTTPClient
Returns a new instance of HTTPClient.
21 22 23 24 25 26 27 |
# File 'lib/pxmyportal/http_client.rb', line 21 def initialize(debug: false, logger:) @http = Net::HTTP.new(PXMyPortal::HOST, Net::HTTP.https_default_port) @http.use_ssl = true @http.set_debug_output($stderr) if debug @cookie = PXMyPortal::Cookie.new(logger:) end |
Instance Method Details
#start ⇒ Object
29 30 31 |
# File 'lib/pxmyportal/http_client.rb', line 29 def start @http.started? or @http.start end |