scotty-web / scotty

Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp (Official Repository)
http://hackage.haskell.org/package/scotty
BSD 3-Clause "New" or "Revised" License
1.71k stars 132 forks source link

Update README.md #375

Closed zetos closed 4 months ago

zetos commented 4 months ago

Hello,

While following the example in the README. When using pathParam, I encountered an error.

image

Simply changing pathParam to captureParam resolved the issue and the functionality worked as expected.

image

should be easy to reproduce but here are the versions that i am using:

ghc version 9.8.1 stack version 2.15.3 cabal version 3.10.2.1

ocramz commented 4 months ago

hi @zetos , we recently introduced pathParam as a synonym. What version of scotty gave you the error?

zetos commented 4 months ago

hi @zetos , we recently introduced pathParam as a synonym. What version of scotty gave you the error?

I must be doing something wrong then, i am using scotty version 0.20 in my package.yaml file:

dependencies:
- base >= 4.7 && < 5
- scotty >= 0.20

edit:

Using stack the most recent version is 0.20.1. But using only cabal and with the scotty version 0.21 the pathParam worked. I guess theres to need for this PR, i will close it.