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 #304 #306

Closed ocramz closed 10 months ago

ocramz commented 10 months ago
ocramz commented 9 months ago

yep! 'param' is deprecated since 0.20

On Thu, 19 Oct 2023 at 11:16, Lokesh Mohanty @.***> wrote:

@.**** commented on this pull request.

In README.md https://github.com/scotty-web/scotty/pull/306#discussion_r1365184989:

@@ -10,7 +10,7 @@ import Data.Monoid (mconcat)

main = scotty 3000 $ get "/:word" $ do

  • beam <- param "word"
  • beam <- captureParam "word"

Any reason to replace param with captureParam?

— Reply to this email directly, view it on GitHub https://github.com/scotty-web/scotty/pull/306#pullrequestreview-1687153375, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNBDKCX4YRP5IUVDNXXXIDYADVW5AVCNFSM6AAAAAA5GUD6HGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTMOBXGE2TGMZXGU . You are receiving this because you modified the open/close state.Message ID: @.***>

lokeshmohanty commented 9 months ago

Thanks! I was confused due to an error saying that captureParam' doesn't exist and also it didn't show up onhoogle'.

ocramz commented 9 months ago

ah, I now see hoogle still points to 0.12 , which is unfortunate. I suspect this is because scotty-0.20 hasn't made it to a stackage LTS release yet.

in the meantime, consider if you're able to upgrade to > 0.20 ! a number of papercuts have been fixed, with minimal breakage.

On Thu, 19 Oct 2023 at 11:42, Lokesh Mohanty @.***> wrote:

Thanks! I was confused due to an error saying that captureParam' doesn't exist and also it didn't show up onhoogle'.

— Reply to this email directly, view it on GitHub https://github.com/scotty-web/scotty/pull/306#issuecomment-1770448785, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNBDKG45RICIL4E5WCTMFDYADYZ7AVCNFSM6AAAAAA5GUD6HGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZQGQ2DQNZYGU . You are receiving this because you modified the open/close state.Message ID: @.***>

lokeshmohanty commented 9 months ago

Thanks a lot! Will do.