diff options
author | gebele <gebele@in-silico.ch> | 2013-05-07 17:08:21 +0200 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2013-05-07 17:08:21 +0200 |
commit | 59fcfe84cc08500f5454e31d714266e9460870f8 (patch) | |
tree | 6ce9f470f92ceb4d76a563d523369aa6cec8f81d | |
parent | 71d3e9ca6dc066cc511f9a100ef8354cae2b31e6 (diff) |
added HEAD route on dataset/:id
-rw-r--r-- | application.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/application.rb b/application.rb index 20fadad..167f968 100644 --- a/application.rb +++ b/application.rb @@ -37,6 +37,20 @@ module OpenTox parse_put end + head "/dataset/:id/?" do + case @accept + when "application/rdf+xml", "text/turtle", "text/plain", /html/ + r = FourStore.list @accept + if r =~ /dataset\/#{params[:id]}/ + true + else + false + end + else + bad_request_error "'#{@accept}' is not a supported content type." + end + end + get "/dataset/:id/?" do case @accept when "application/rdf+xml", "text/turtle", "text/plain", /html/ |