mirror of
https://github.com/vale981/lack
synced 2025-03-04 17:01:41 -05:00
Use :request-method and :request-uri in ENV like Clack does.
This commit is contained in:
parent
7a19bc15ce
commit
9fd299e6c4
2 changed files with 2 additions and 10 deletions
11
README.md
11
README.md
|
@ -32,7 +32,7 @@ Lack is an experimental project for redesigning Clack with performance and simpl
|
|||
|
||||
The environment, an application takes, is a property list containing the following keys:
|
||||
|
||||
- `:method` (Required, Keyword)
|
||||
- `:request-method` (Required, Keyword)
|
||||
- The HTTP request method: `:GET`, `:HEAD`, `:OPTIONS`, `:PUT`, `:POST`, or `:DELETE`.
|
||||
- `:script-name` (Required, String)
|
||||
- The initial portion of the request URI path that corresponds to the Clack application. The value of this key may be an empty string when the client is accessing the application represented by the server's root URI. Otherwise, it is a non-empty string starting with a forward slash (`/`).
|
||||
|
@ -46,7 +46,7 @@ The environment, an application takes, is a property list containing the followi
|
|||
- The port on which the request is being handled.
|
||||
- `:server-protocol` (Required, Keyword)
|
||||
- The version of the protocol the client used to send the request: typically `:HTTP/1.0` or `:HTTP/1.1`.
|
||||
- `:uri` (Required, String)
|
||||
- `:request-uri` (Required, String)
|
||||
- The request URI. Always starts with "/".
|
||||
- `:raw-body` (Optional, Stream)
|
||||
- The new body of the request.
|
||||
|
@ -57,13 +57,6 @@ The environment, an application takes, is a property list containing the followi
|
|||
- `:headers` (Required, Hash-Table)
|
||||
- A hash table of headers.
|
||||
|
||||
Old versions of Clack also had the following keys. These are now deprecated.
|
||||
|
||||
- `:request-method`
|
||||
- Use `:method` instead.
|
||||
- `:request-uri`
|
||||
- Use `:uri` instead.
|
||||
|
||||
## The Response
|
||||
|
||||
### Normal response
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
|
||||
(defun make-request (env)
|
||||
(let ((req (apply #'%make-request :env env :allow-other-keys t env)))
|
||||
;; for backward-compatibility
|
||||
(with-slots (method uri) req
|
||||
(unless method
|
||||
(setf method (getf env :request-method)))
|
||||
|
|
Loading…
Add table
Reference in a new issue