Method: Line::Bot::HTTPClient#http

Defined in:
lib/line/bot/v1/httpclient.rb

#http(uri) ⇒ Net::HTTP

Deprecated.

This is obsolete.

Returns:

  • (Net::HTTP)


45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/line/bot/v1/httpclient.rb', line 45

def http(uri)
  http = Net::HTTP.new(uri.host, uri.port)
  if uri.scheme == "https"
    http.use_ssl = true
  end

  http_options&.each do |key, value|
    http.send("#{key}=", value)
  end

  http
end