Sha256: 8401aad5546a24e04e3d082e2f7ae42745a7953db4c2382f8856a179eecf1ace

Contents?: true

Size: 407 Bytes

Versions: 3

Compression:

Stored size: 407 Bytes

Contents

# frozen_string_literal: true

require "net/http"

module SmartTodo
  # @api private
  class HttpClientBuilder
    class << self
      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
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
smart_todo-1.9.0 lib/smart_todo/http_client_builder.rb
smart_todo-1.8.0 lib/smart_todo/http_client_builder.rb
smart_todo-1.7.0 lib/smart_todo/http_client_builder.rb