chickadee » call-with-query » display-status-&c.

display-status-&c.procedure
display-status-&c. statusprocedure
display-status-&c. status content-type #!rest restprocedure

Display the status, content-type and prolog.

status
Status code, e.g. status-no-content or 204
content-type
Content-type, e.g. xhtml
rest
Optional arguments to the status, e.g. location in the case of 300
(define display-status-&c.
  (case-lambda
    (() (display-status-&c. (default-status)))
    ((status) (display-status-&c. status (default-content-type)))
    ((status content-type . rest)
     (display-status status)
     (apply (alist-ref/default statuses status void) rest)
     (display-content-type-&c. content-type))))