Permalink
Browse files

Add HTTPS support to the Sfn::Loader#get and #post methods.

  • Loading branch information...
1 parent 3f6d1eb commit ddeb9d5587ea0574e215a020b664c93e679574ec Eugene Park committed with Dec 17, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/satisfaction/loader.rb
View
2 lib/satisfaction/loader.rb
@@ -34,6 +34,7 @@ def get(url, options = {})
end
http = Net::HTTP.new(uri.host, uri.port)
+ http.use_ssl = true if uri.scheme.try(:downcase) == 'https'
add_authentication(request, http, options)
response = execute(http, request)
@@ -86,6 +87,7 @@ def post(url, options)
request.set_form_data(form)
http = Net::HTTP.new(uri.host, uri.port)
+ http.use_ssl = true if uri.scheme.try(:downcase) == 'https'
add_authentication(request, http, options)
response = execute(http, request)

0 comments on commit ddeb9d5

Please sign in to comment.