Skip to content

Commit

Permalink
Exposed simple cookie functions via Web.scotty & Trans
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharad committed Apr 11, 2024
1 parent 8a55318 commit c280dcc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Web/Scotty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ module Web.Scotty
-- * Types
, ScottyM, ActionM, RoutePattern, File, Content(..), Kilobytes, ErrorHandler, Handler(..)
, ScottyState, defaultScottyState
, module Web.Scotty.Cookie
) where

import qualified Web.Scotty.Trans as Trans
Expand All @@ -71,6 +72,7 @@ import qualified Network.Wai.Parse as W

import Web.Scotty.Internal.Types (ScottyT, ActionT, ErrorHandler, Param, RoutePattern, Options, defaultOptions, File, Kilobytes, ScottyState, defaultScottyState, ScottyException, StatusError(..), Content(..))
import UnliftIO.Exception (Handler(..), catch)
import Web.Scotty.Cookie (setSimpleCookie,getCookie,getCookies,deleteCookie,makeSimpleCookie)

{- $setup
>>> :{
Expand Down
2 changes: 2 additions & 0 deletions Web/Scotty/Trans.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ module Web.Scotty.Trans
-- * Monad Transformers
, ScottyT, ActionT
, ScottyState, defaultScottyState
, module Web.Scotty.Cookie
) where

import Blaze.ByteString.Builder (fromByteString)
Expand All @@ -84,6 +85,7 @@ import Web.Scotty.Util (socketDescription)
import Web.Scotty.Body (newBodyInfo)

import UnliftIO.Exception (Handler(..), catch)
import Web.Scotty.Cookie (setSimpleCookie,getCookie,getCookies,deleteCookie,makeSimpleCookie)


-- | Run a scotty application using the warp server.
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## next [????.??.??]

* Fixed cookie example from `Cookie` module documentation. `getCookie` Function would return strict variant of `Text`. Will convert it into lazy variant using `fromStrict`.
* Exposed simple functions of `Cookie` module via `Web.Scotty` & `Web.Scotty.Trans`.

### Breaking changes
* Remove dependency on data-default class (#386). We have been exporting constants for default config values since 0.20, and this dependency was simply unnecessary.
Expand Down

0 comments on commit c280dcc

Please sign in to comment.