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

Exposed simple cookie functions via Main interface. #395

Closed tusharad closed 2 months ago

tusharad commented 3 months ago

As mentioned in #350 issue. I have exposed the cookie module from Web.Scotty & Web.Scotty.Trans. Though I only exported simple functions of the cookie module which are:

  1. setSimpleCookie
  2. getCookie
  3. getCookies
  4. deleteCookie
  5. makeSimpleCookie

If the user wants to use SetCookie functions then the user should import Web.Scotty.Cookie. Let me know if I should expose all the functions or not. Thanks.

@ocramz

tusharad commented 3 months ago

Thanks for the suggestion @fumieval! Added explicit function list.

ocramz commented 2 months ago

Thank you @tusharad , great!

Could you please also update the example program in examples/, so that it uses the new API?

tusharad commented 2 months ago

Hi @ocramz , I changed the examples/cookies.hs example. Let me know if you want anything else.

ocramz commented 2 months ago

Thank you @tusharad !