- text/html/json only set Content-Type header when not already set
-
Add
charset=utf-8
toContent-Type
fortext
,html
andjson
-
Assume HTTP status 500 for
defaultHandler
-
Remove deprecated
source
method. -
No longer depend on conduit.
-
Bump
aeson
upper bound -
Fix
mtl
related deprecation warnings
-
Export internal types
-
Added
MonadBase
,MonadTransControl
andMonadBaseControl
instances forActionT
-
Upgrade to wai/wai-extra/warp 3.0
-
No longer depend on conduit-extra.
-
The
source
response method has been deprecated in favor of a newstream
response, matching changes in WAI 3.0. -
Removed the deprecated
reqHeader
function.
- Bump upper bound for case-insensitive, mtl and transformers.
- Bump lower bound on conduit, add conduit-extra to cabal build depends.
- Default warp settings now use
setFdCacheDuration 0
to work around a warp issue where file changes are not getting picked up.
-
Renamed
reqHeader
toheader
. Addedheaders
function to get all headers. -
Changed
MonadIO
instance forActionT
such that IO exceptions are lifted intoScottyError
s viastringError
. -
Make
Bool
parsing case-insensitive. Goal: support both Haskell's True/False and Javascript's true/false. Thanks to Ben Gamari for suggesting this. -
Bump
aeson
/text
upper bounds. -
Bump
wai
/wai-extra
/warp
bounds, including new lower bound forwarp
, which fixes a security issue related to Slowloris protection.
- Bump upper bound for
text
.
- Match changes in
wai-extra
.
-
The Scotty transformers (
ScottyT
andActionT
) are now parameterized over a custom exception type, allowing one to extend Scotty'sErrorT
layer with something richer thanText
errors. See theexceptions
example for use.ScottyM
andActionM
remain specialized toText
exceptions for simplicity. -
Both monads are now instances of
Functor
andApplicative
. -
There is a new
cookies
example. -
Internals brought up-to-date with WAI 2.0 and related packages.
-
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).