Hi, artanis:
Two questions:
1. how to use Config API
e.g.
(current-myhost)
causes unbund error.
2. how to use HTTP Basic authentication
the code
;; test HTTP Basic authentication (BA) implementation
(use-modules (artanis artanis))
(init-server)
(define (my-checker rc user passwd)
(and (string=? user "jack") (string=? passwd "123")))
(post "/bauth" #:auth `(basic ,my-checker)
(lambda (rc)
(if (:auth rc)
"auth ok"
(throw-auth-needed))))
(run #:port 8080)
but
is 404.
best regards,
wxie