diff options
Diffstat (limited to 'src/lazybones.lisp')
-rw-r--r-- | src/lazybones.lisp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lazybones.lisp b/src/lazybones.lisp index d993f1d..d1e186e 100644 --- a/src/lazybones.lisp +++ b/src/lazybones.lisp @@ -462,6 +462,13 @@ making a new one if not." "Singals an HTTP-ERROR with code and content." (signal 'http-error :content content :code code)) +(defun http-redirect (location) + "Set the lazybones response header and response code for redirecting to LOCATION. +This procedure will error if lazybones:*response* is not currently bound." + (setf (response-header :location) location + (response-code) "303")) + + ;;; MANAGING DEFINITIONS |