diff options
Diffstat (limited to 'gn3-guile')
-rwxr-xr-x | gn3-guile/web/webserver.scm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gn3-guile/web/webserver.scm b/gn3-guile/web/webserver.scm index db9eb62..08e2412 100755 --- a/gn3-guile/web/webserver.scm +++ b/gn3-guile/web/webserver.scm @@ -102,7 +102,11 @@ SELECT DISTINCT ?species WHERE { (define-values (names res) (sparql-species-meta)) (define table (get-rows names res)) (define recs '()) -(compile-species recs table) +(define h (compile-species recs table)) +(assoc "http://genenetwork.org/species_drosophila_melanogaster" h) +(assoc-ref h "http://genenetwork.org/species_drosophila_melanogaster") ;; note switch! +(define d (car h)) +(assoc-ref (list d) "http://genenetwork.org/species_drosophila_melanogaster") !# (define (sparql-species-meta) @@ -184,9 +188,11 @@ SELECT ?species ?p ?o WHERE { (scm->json json port)))) (define (render-json-string2 json) - (list '((content-type . (application/json))) + (list '((content-type . (text/plain))) (lambda (port) - (display "ThthEST" port)))) + ;; (display "ThthxST" port) + (format port "~a" "foo") + ))) (define (controller request body) (match-lambda @@ -194,6 +200,8 @@ SELECT ?species ?p ?o WHERE { (render-json info)) (('GET "meh") (render-json-string2 "ITEST")) + (('HEAD "meh") + (render-json-string2 "ITEST")) (('GET "meta") (render-json info-meta)) (('GET "version") |