cl-scopes/web/cookie.lisp

16 lines
494 B
Common Lisp

;;;; cl-scopes/web/cookie - interface to cl-cookie for simplified access
(defpackage :scopes/web/cookie
(:use :common-lisp)
(:local-nicknames (:c cl-cookie))
(:export #:create #:make-header))
(in-package :scopes/web/cookie)
(defun create (name value &key max-age (path "/") (httponly-p t))
(c:make-cookie :name name :value value
:path path :httponly-p httponly-p
:max-age max-age))
(defun make-header (cookie)
(c:write-set-cookie-header cookie))