diff --git a/lib/signrequest_client/api_client.rb b/lib/signrequest_client/api_client.rb index 6ef0a63..47679fd 100644 --- a/lib/signrequest_client/api_client.rb +++ b/lib/signrequest_client/api_client.rb @@ -264,7 +264,7 @@ def sanitize_filename(filename) def build_request_url(path) # Add leading and trailing slashes to path path = "/#{path}".gsub(/\/+/, '/') - URI.encode(@config.base_url + path) + URI::DEFAULT_PARSER.escape(@config.base_url + path) end # Builds the HTTP request body diff --git a/lib/signrequest_client/configuration.rb b/lib/signrequest_client/configuration.rb index 6443e24..c0854b5 100644 --- a/lib/signrequest_client/configuration.rb +++ b/lib/signrequest_client/configuration.rb @@ -175,7 +175,7 @@ def base_path=(base_path) def base_url url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') - URI.encode(url) + URI::DEFAULT_PARSER.escape(url) end # Gets API key (with prefix if set).