-
The Scotty monads (
ScottyM
andActionM
) are now monad transformers, allowing Scotty applications to be embedded in arbitraryMonadIO
s. The old API continues to be exported fromWeb.Scotty
where:type ScottyM = ScottyT IO type ActionM = ActionT IO
The new transformers are found in
Web.Scotty.Trans
. See theglobalstate
example for use. Special thanks to Dan Frumin (co-dan) for much of the legwork here. -
Added support for HTTP PATCH method.
-
Removed lambda action syntax. This will return when we have a better story for typesafe routes.
-
reqHeader :: Text -> ActionM Text
==>reqHeader :: Text -> ActionM (Maybe Text)
-
New
raw
method to set body to a rawByteString
-
Parse error thrown by
jsonData
now includes the body it couldn't parse. -
header
split intosetHeader
andaddHeader
. The former replaces a response header (original behavior). The latter adds a header (useful for multipleSet-Cookie
s, for instance).