-
Notifications
You must be signed in to change notification settings - Fork 256
Common Problems
Leif Metcalf edited this page Sep 19, 2024
·
5 revisions
This page lists some pitfalls that may not be obvious to users. Feel free to add your own!
- In a request, the value for
:body
is anInputStream
. InputStream is mutable and can only ever be read once. Anything that tries to read theInputStream
after it has already been read will fail to do so. If you find the value for:body
empty when it shouldn't be, the most likely cause is some other middleware higher in the stack reading theInputStream
before it gets to you.- Ex: If you have two sets of routes in the same stack each using the
wrap-params
middleware. Only the first routes would have the params.
- Ex: If you have two sets of routes in the same stack each using the
- Use the remove-trailing-slash middleware.