From 1c146314a3c956364dabbea7515dca9449dd0a8b Mon Sep 17 00:00:00 2001 From: mguetlein Date: Mon, 6 Oct 2014 21:41:31 +0200 Subject: add head methods for each service --- lib/opentox.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/opentox.rb b/lib/opentox.rb index b99fe92..bd5415c 100644 --- a/lib/opentox.rb +++ b/lib/opentox.rb @@ -148,13 +148,17 @@ module OpenTox # Default methods, may be overwritten by derived services # see http://jcalcote.wordpress.com/2008/10/16/put-or-post-the-rest-of-the-story/ + # HEAD methods only used if there is no GET method in the particular service + # E.g. "head "/#{SERVICE}/:id/?"" is overwritten by "get '/task/:id/?'" + # The following HEAD methods are only used by the feature service + # HEAD route for service check - # algorithm, compound and validation overwrite this + # algorithm, dataset, model, compound, and validation overwrite this head "/#{SERVICE}/?" do end # HEAD request for object in backend - # algorithm, dataset, compound and validation overwrite this + # algorithm, dataset, model, compound, and validation overwrite this head "/#{SERVICE}/:id/?" do halt 404 unless FourStore.head(@uri.split('?').first) end -- cgit v1.2.3