diff options
author | Pjotr Prins | 2023-07-22 14:53:58 +0200 |
---|---|---|
committer | Pjotr Prins | 2023-07-22 14:53:58 +0200 |
commit | ac059c92e1d678d8c4f5678fa2e14bc0110ffa11 (patch) | |
tree | ad8ded9f20d16204ffb20cda0f2f0b738a466d6a /gn3-guile/web/webserver.scm | |
parent | 9cd3e8a4729920794cd8c14be6f7bf280910378c (diff) | |
download | genenetwork3-ac059c92e1d678d8c4f5678fa2e14bc0110ffa11.tar.gz |
Trying stuff
Diffstat (limited to 'gn3-guile/web/webserver.scm')
-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") |