(let x 'y (= x 34))
(mac defop (name parms . body) `(= (srvops* ',name) (fn ,parms ,@body)))
(let url "hello" (= (srvops* sym.url) (fn (output req) (w/stdout output (prrn) (pr "hello world")))))
-----
Edit: on anarki you get this behavior by replacing the function respond in lib/srv.arc with this code:
(def respond (out req) (w/stdout out (prrn "HTTP/1.1 200 OK") (prrn "Content-Type: text/html; charset=utf-8") (prrn "Connection: close") (prrn) (wildcard-handler req))) (def wildcard-handler (req) (prn req!op))