lib/etsy/basic_client.rb in etsy-0.2.2 vs lib/etsy/basic_client.rb in etsy-0.2.3

- old
+ new

@@ -11,10 +11,16 @@ def initialize @host = Etsy.host end def client # :nodoc: - @client ||= Net::HTTP.new(@host) + if @client + return @client + else + @client = Net::HTTP.new(@host, Etsy.protocol == "http" ? 80 : 443) + @client.use_ssl = true if Etsy.protocol == "https" + return @client + end end # Fetch a raw response from the specified endpoint # def get(endpoint)