Skip to content

Commit

Permalink
additional ssl changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-voronenko committed Jun 14, 2019
1 parent 97043c5 commit d492964
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/howitzer/mailgun_api/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ def initialize(api_user: 'api', api_key:, api_host: 'api.mailgun.net', api_versi
@api_host = api_host
@api_version = api_version
@ssl = ssl
@http_client = ::RestClient::Resource.new(endpoint, user: api_user, password: api_key, user_agent: USER_AGENT, verify_ssl: Howitzer.mailgun_ssl)
@http_client = ::RestClient::Resource.new(
endpoint, user: api_user, password: api_key,
user_agent: USER_AGENT, verify_ssl: Howitzer.mailgun_ssl
)
end

# Generic Mailgun GET Handler
Expand Down Expand Up @@ -49,15 +52,15 @@ def get(resource_path, params: nil, accept: '*/*')
# @raise [CommunicationError] if something went wrong
# @return [Mailgun::Response] a Mailgun::Response object.

def get_url(resource_url, params: { verify_ssl: Howitzer.mailgun_ssl }, accept: '*/*')
def get_url(resource_url, accept: '*/*')
response = ::RestClient::Request.execute(
method: :get,
url: resource_url,
user: api_user,
password: api_key,
user_agent: USER_AGENT,
accept: accept,
params: params
verify_ssl: Howitzer.mailgun_ssl
)
Response.new(response)
rescue => e
Expand Down

0 comments on commit d492964

Please sign in to comment.