This library defines an alternative constructor function for LACK/REQUEST:REQUEST
structs and extracts parsing functionality to standard functions instead of parsing cookies, query parameters, and body parameters and modifying the application environment directly from the constructor.
An additional package related to content-negotiation is also provided, FOO.LISP.LACK/REQUEST/CONTENT-NEGOTIATION
.
Example:
(let ((request (foo.lisp.lack/request:make-request env)))
(let ((cookies (foo.lisp.lack/request:request-cookies request))
(body-parameters (foo.lisp.lack/request:request-body-parameters request))
(query-parameters (foo.lisp.lack/request:request-query-parameters request)))
;; ...
))
Not in Quicklisp, so clone the repository to "local-projects/".
Run tests:
(asdf:test-system :foo.lisp.lack-request)
- John Newton (jnewton@lisplizards.dev)
- John Newton
- Eitaro Fukamachi (author of Lack)
The functions in src/main.lisp have been adapted by John Newton from lack/request (original author: Eitaro Fukamachi).
Additions by John Newton:
- Add content negotiation package (
FOO.LISP.LACK/REQUEST/CONTENT-NEGOTIATION
, file: src/content-negotiation.lisp)
MIT