Permalink
Browse files

add ssl support

  • Loading branch information...
1 parent 0777701 commit 3aa13a794831177dc7520cd74e095584509b625f @yyyc514 yyyc514 committed Mar 17, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/zendesk/main.rb
View
@@ -7,6 +7,7 @@ def initialize(account, username, password, options = {})
@account = account
@username = username
@password = password
+ @options = options
if options[:format] && ['xml','json'].any?{|f| f == options[:format]}
@format = options[:format]
else
@@ -15,7 +16,7 @@ def initialize(account, username, password, options = {})
end
def main_url
- url_prefix = "http://"
+ url_prefix = @options[:ssl] ? "https://" : "http://"
url_postfix = ".zendesk.com/"
url = url_prefix + @account + url_postfix
end

0 comments on commit 3aa13a7

Please sign in to comment.