diff options
author | colin <colin@cicadas.surf> | 2023-11-26 08:44:36 -0800 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2023-11-26 08:44:36 -0800 |
commit | 5aeff682246be07bf13c7c50f7899d790de3ad5b (patch) | |
tree | 900d8f71226dec93bf7c91b139ff823046ae30d2 /src/lazybones.lisp | |
parent | f0aed2231f077a05f3bcb95cf332dd75866dc9aa (diff) |
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 |