Next: , Previous: , Up: Top   [Contents][Index]


15 (www data http-status)

The (www data http-status) module exports a single procedure:

Procedure: http-status-string number

Return the string associated with HTTP status number.

example

Here is a simple example using this module:

(use-modules ((www data http-status)
              #:select (http-status-string)))

(define (h2 n)
  (format #f "<H2>~A ~A</H2>"
          n (http-status-string n)))

(h2 404) ⇒ "<H2>404 Not Found</H2>"
(h2 307) ⇒ "<H2>307 Temporary Redirect</H2>"