Commit 20c237ed authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

add support for ssl

parent dcfbeffe
......@@ -33,6 +33,10 @@ class GitlabNet
end
def get(url)
Net::HTTP.get_response(URI.parse(url))
url = URI.parse(url)
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = (url.port == 443)
request = Net::HTTP::Get.new(url.path)
http.start {|http| http.request(request) }
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment