Created
June 20, 2024 12:08
-
-
Save metaleap/4c88cf2cd820ecb2d49c4c1bbec22ef7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; -*- Gerbil -*- | |
(import :std/error | |
:std/sugar | |
:std/io | |
(only-in :std/net/httpd/handler read-request-headers read-request-body)) | |
(export main) | |
(def payload1 "Content-Length: 128\r\n\r\n{\"jsonrpc\":\"2.0\",\"id\":\"g0\",\"result\":[{\"uri\":\"file:///home/_/c/l\",\"name\":\"l\"},{\"uri\":\"file:///home/_/g/gerbil\",\"name\":\"gerbil\"}]}") | |
(def payload2 "Content-Length: 128\n\n{\"jsonrpc\":\"2.0\",\"id\":\"g0\",\"result\":[{\"uri\":\"file:///home/_/c/l\",\"name\":\"l\"},{\"uri\":\"file:///home/_/g/gerbil\",\"name\":\"gerbil\"}]}") | |
(def (main . args) | |
(def ibuf (open-buffered-reader (string->bytes payload2))) | |
(def headers (read-request-headers ibuf)) | |
(displayln "HOLA") | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment