lack-request

June 14, 2024 ยท View on GitHub

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.

Usage

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)))
      ;; ...
     ))

Installation

Not in Quicklisp, so clone the repository to "local-projects/".

Development

Run tests:

(asdf:test-system :foo.lisp.lack-request)

Dependencies

Tests

Author

  • 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)

License

MIT