diff options
Diffstat (limited to 'lib/rest-client-wrapper.rb')
-rw-r--r-- | lib/rest-client-wrapper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rest-client-wrapper.rb b/lib/rest-client-wrapper.rb index c9e6bbb..13ccf09 100644 --- a/lib/rest-client-wrapper.rb +++ b/lib/rest-client-wrapper.rb @@ -17,11 +17,11 @@ module OpenTox # check input bad_request_error "Invalid URI: '#{uri}'" unless URI.valid? uri - not_found_error "URI '#{uri}' not found." unless URI.accessible? uri + not_found_error "URI '#{uri}' not found." unless URI.accessible? uri unless URI.ssl?(uri) bad_request_error "Headers are not a hash: #{headers.inspect}" unless headers==nil or headers.is_a?(Hash) # make sure that no header parameters are set in the payload [:accept,:content_type,:subjectid].each do |header| - bad_request_error "#{header} should be submitted in the headers" if payload and payload.is_a?(Hash) and payload[header] + bad_request_error "#{header} should be submitted in the headers" if payload and payload.is_a?(Hash) and payload[header] unless URI(uri).host == URI(AA).host end # create request |