class PSClient::APIConnection
Public Class Methods
new(uri=nil,path=nil)
click to toggle source
# File lib/ps_pop_client/request.rb, line 6 def initialize(uri=nil,path=nil) @base_uri = uri @path = path end
Public Instance Methods
get()
click to toggle source
# File lib/ps_pop_client/request.rb, line 11 def get url = get_url request = Net::HTTP::Get.new(url) http = Net::HTTP.new(url.host, url.port) http.use_ssl = true if url.scheme == 'https' response = http.request(request) return response end
Private Instance Methods
get_url()
click to toggle source
# File lib/ps_pop_client/request.rb, line 21 def get_url URI.parse("#{@base_uri}#{@path}") end