From 4f98fc6c5733e4f2760f73c93f437b062d6a8695 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Thu, 21 Jul 2011 14:01:40 +0200 Subject: Support for SDF in GET --- application.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'application.rb') diff --git a/application.rb b/application.rb index a77d5d3..c64d5ce 100644 --- a/application.rb +++ b/application.rb @@ -168,6 +168,10 @@ get '/:id' do response['Content-Type'] = 'application/ms-excel' File.open(file).read + when /chemical\/x-mdl-sdfile/ + response['Content-Type'] = 'chemical/x-mdl-sdfile' + YAML.load_file(@yaml_file).to_sdf + else raise OpenTox::NotFoundError.new "Content-type #{@accept} not supported." end -- cgit v1.2.3