From 0a59fae1679266281515a52f554b1533ebd330b0 Mon Sep 17 00:00:00 2001 From: davor Date: Tue, 20 Mar 2012 14:00:54 +0100 Subject: Compound name. --- application.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application.rb b/application.rb index fe04547..a5a2dfb 100644 --- a/application.rb +++ b/application.rb @@ -86,6 +86,9 @@ get %r{/(.+)} do |inchi| # catches all remaining get requests response['Content-Type'] = "text/plain" uri = File.join @@cactus_uri,@inchi,"names" RestClient.get(uri).body + when "text/list" + response['Content-Type'] = "text/list" + OpenTox::Compound.from_inchi(@inchi).to_names_hash.inspect else raise OpenTox::BadRequestError.new "Unsupported MIME type '#{request.env['HTTP_ACCEPT']}'" end -- cgit v1.2.3