Class: SmartTodo::HttpClientBuilder Private

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_todo/http_client_builder.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.build(endpoint) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



9
10
11
12
13
14
15
16
# File 'lib/smart_todo/http_client_builder.rb', line 9

def build(endpoint)
  Net::HTTP.new(endpoint, Net::HTTP.https_default_port).tap do |client|
    client.use_ssl = true
    client.read_timeout = 30
    client.ssl_timeout = 15
    client.max_retries = 2
  end
end