Table of contents
Introduction
We’re happy to announce the release of servant-0.14
. This is relatively small release, still containing some new features and breaking changes.
Significant changes
Stream
takes a status code argumentToStreamGenerator
definition changed, so it’s possible to write an instance for conduits.-class ToStreamGenerator f a where - toStreamGenerator :: f a -> StreamGenerator a +class ToStreamGenerator a b | a -> b where + toStreamGenerator :: a -> StreamGenerator b
(#959)
Added
NoFraming
streaming strategy (#959)servant-client-core Free
Client
implementation. Useful for testingHasClient
instances. (#920)servant-client-core Add
hoistClient
toHasClient
. Just likehoistServer
allows us to change the monad in which request handlers of a web application live in, we also havehoistClient
for changing the monad in which client functions live. Read tutorial section for more information. (#936)If you have own combinators, you’ll need to define a new method of
HasClient
class, for example:servant Add
safeLink' :: (Link -> a) -> ... -> MkLink endpoint a
, which allows to create helpers returning something else thanLink
. (#968)servant-server File serving in polymorphic monad. i.e. Generalised types of
serveDirectoryFileServer
etc functions inServant.Utils.StaticFiles
(#953)servant-server
ReqBody
content type check is recoverable. This allows writing APIs like:which is useful when handlers are subtly different, for example may do less work. (#937)
servant-client Add more constructors to
RequestBody
, includingRequestBodyStream
. Note: we are looking for http-library agnostic API, so the might change again soon. Tell us which constructors are useful for you! (#913)
Other changes
GetHeaders
instances implemented withoutOverlappingInstances
(#971)Added tests or enabled tests (#975)
Add
servant-flatten
“spice” to the structuring api recipe (#929)