summaryrefslogtreecommitdiff
path: root/lib/rest-client-wrapper.rb
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2017-06-09 11:08:45 +0000
committergebele <gebele@in-silico.ch>2017-06-09 11:08:45 +0000
commit710031f953429c6e1a76aff4984ee76f7a1ee485 (patch)
treeb56de76f91500ba72edfb22396dfe9547616eeaa /lib/rest-client-wrapper.rb
parent9aa5203dd375225996c1efe4be1a4324ddc6cda7 (diff)
added addressable gem to avoid URI::InvalidURIError
Diffstat (limited to 'lib/rest-client-wrapper.rb')
-rw-r--r--lib/rest-client-wrapper.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rest-client-wrapper.rb b/lib/rest-client-wrapper.rb
index f76a296..c9fd40f 100644
--- a/lib/rest-client-wrapper.rb
+++ b/lib/rest-client-wrapper.rb
@@ -26,6 +26,7 @@ module OpenTox
define_singleton_method method do |uri,payload={},headers={},waiting_task=nil|
+ uri = Addressable::URI.encode(uri)
# check input
bad_request_error "Headers are not a hash: #{headers.inspect} for #{uri}." unless headers==nil or headers.is_a?(Hash)
headers[:subjectid] ||= @@subjectid