Skip to content

Commit

Permalink
Encode url before handing to RestClient to execute a request
Browse files Browse the repository at this point in the history
Fixes issue ManageIQ#183
  • Loading branch information
bzwei authored and Daniel Berger committed Jun 17, 2016
1 parent b33a4bb commit 27fb308
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/azure/armrest/armrest_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ class << self
private

def rest_execute(options, http_method = :get)
RestClient::Request.execute(options.merge(:method => http_method))
options = options.merge(
:method => http_method,
:url => Addressable::URI.escape(options[:url])
)
RestClient::Request.execute(options)
rescue RestClient::Exception => e
raise_api_exception(e)
end
Expand Down

0 comments on commit 27fb308

Please sign in to comment.