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
Streamtakes a status code argumentToStreamGeneratordefinition 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
NoFramingstreaming strategy (#959)servant-client-core Free
Clientimplementation. Useful for testingHasClientinstances. (#920)servant-client-core Add
hoistClienttoHasClient. Just likehoistServerallows us to change the monad in which request handlers of a web application live in, we also havehoistClientfor 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
HasClientclass, 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
serveDirectoryFileServeretc functions inServant.Utils.StaticFiles(#953)servant-server
ReqBodycontent 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
GetHeadersinstances implemented withoutOverlappingInstances(#971)Added tests or enabled tests (#975)
Add
servant-flatten“spice” to the structuring api recipe (#929)