12345678910111213141516171819 |
- (library (handlers not-found-404)
- (export not-found-404-handler)
- (import
- (except (rnrs base) let-values error)
- (only (guile)
- lambda* λ)
- ;; standard web library
- (web request)
- (web response)
- (web uri)))
- (define not-found-404-handler
- (λ (request body)
- "Answer with a 404 HTTP status code."
- (values (build-response #:code 404)
- (string-append "requested resource not found: "
- (uri->string (request-uri request))))))
|