1[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-server/CHANGELOG.md)
2[Changelog for `servant` package contains significant entries for all core packages.](https://github.com/haskell-servant/servant/blob/master/servant/CHANGELOG.md)
9- Add NoContentVerb [#1028](https://github.com/haskell-servant/servant/issues/1028) [#1219](https://github.com/haskell-servant/servant/pull/1219) [#1228](https://github.com/haskell-servant/servant/pull/1228)
11 The `NoContent` API endpoints should now use `NoContentVerb` combinator.
12 The API type changes are usually of the kind
15 - :<|> PostNoContent '[JSON] NoContent
19 i.e. one doesn't need to specify the content-type anymore. There is no content.
21- `Capture` can be `Lenient` [#1155](https://github.com/haskell-servant/servant/issues/1155) [#1156](https://github.com/haskell-servant/servant/pull/1156)
23 You can specify a lenient capture as
26 :<|> "capture-lenient" :> Capture' '[Lenient] "foo" Int :> GET
29 which will make the capture always succeed. Handlers will be of the
30 type `Either String CapturedType`, where `Left err` represents
31 the possible parse failure.
33- *servant-server* use queryString to parse QueryParam, QueryParams and QueryFlag [#1249](https://github.com/haskell-servant/servant/pull/1249) [#1262](https://github.com/haskell-servant/servant/pull/1262)
35 Some APIs need query parameters rewriting, e.g. in order to support
36 for multiple casing (camel, snake, etc) or something to that effect.
38 This could be easily achieved by using WAI Middleware and modyfing
39 request's `Query`. But QueryParam, QueryParams and QueryFlag use
40 `rawQueryString`. By using `queryString` rather then `rawQueryString`
41 we can enable such rewritings.
43- *servant* *servant-server* Make packages `build-type: Simple` [#1263](https://github.com/haskell-servant/servant/pull/1263)
45 We used `build-type: Custom`, but it's problematic e.g.
46 for cross-compiling. The benefit is small, as the doctests
47 can be run other ways too (though not so conviniently).
52* `singleton-bool-0.1.5` (`SBool` is re-exported)
53 - Add `discreteBool :: Dec (a :~: b)` (GHC-7.8+)
54 - Add `Show`, `Eq`, `Ord` `SBool b` instances.
60* Use `http-api-data-0.4.1` (a part of its API is re-exported)
61 [#1181](https://github.com/haskell-servant/servant/pull/1181)
66- Rename `ServantError` to `ClientError`, `ServantErr` to `ServerError`
67 [#1131](https://github.com/haskell-servant/servant/pull/1131)
68- *servant-server* Reorder HTTP failure code priorities
69 [#1103](https://github.com/haskell-servant/servant/pull/1103)
70- *servant-server* Re-organise internal modules
71 [#1139](https://github.com/haskell-servant/servant/pull/1139)
73 [#1107](https://github.com/haskell-servant/servant/pull/1107)
78- Streaming refactoring.
79 [#991](https://github.com/haskell-servant/servant/pull/991)
80 [#1076](https://github.com/haskell-servant/servant/pull/1076)
81 [#1077](https://github.com/haskell-servant/servant/pull/1077)
83 The streaming functionality (`Servant.API.Stream`) is refactored to use
84 `servant`'s own `SourceIO` type (see `Servant.Types.SourceT` documentation),
85 which replaces both `StreamGenerator` and `ResultStream` types.
87 New conversion type-classes are `ToSourceIO` and `FromSourceIO`
88 (replacing `ToStreamGenerator` and `BuildFromStream`).
89 There are instances for *conduit*, *pipes* and *machines* in new packages:
90 [servant-conduit](https://hackage.haskell.org/package/servant-conduit)
91 [servant-pipes](https://hackage.haskell.org/package/servant-pipes) and
92 [servant-machines](https://hackage.haskell.org/package/servant-machines)
95 Writing new framing strategies is simpler. Check existing strategies for examples.
97 This change shouldn't affect you, if you don't use streaming endpoints.
99- Drop support for GHC older than 8.0
100 [#1008](https://github.com/haskell-servant/servant/pull/1008)
101 [#1009](https://github.com/haskell-servant/servant/pull/1009)
103- *servant* NewlineFraming encodes newline after each element (i.e last)
104 [#1079](https://github.com/haskell-servant/servant/pull/1079)
105 [#1011](https://github.com/haskell-servant/servant/issues/1011)
107- *servant* Add `lookupResponseHeader :: ... => Headers headers r -> ResponseHeader h a`
108 [#1064](https://github.com/haskell-servant/servant/pull/1064)
110- *servant-server* Add `MonadMask Handler`
111 [#1068](https://github.com/haskell-servant/servant/pull/1068)
113- *servant* Export `GetHeaders'`
114 [#1052](https://github.com/haskell-servant/servant/pull/1052)
116- *servant* Add `Bitraversable` and other `Bi-` instances for `:<|>`
117 [#1032](https://github.com/haskell-servant/servant/pull/1032)
119- *servant* Add `PutCreated` method type alias
120 [#1024](https://github.com/haskell-servant/servant/pull/1024)
122- *servant* Add `ToSourceIO (NonEmpty a)` instance
123 [#988](https://github.com/haskell-servant/servant/pull/988)
128- Merge in `servant-generic` (by [Patrick Chilton](https://github.com/chpatrick))
129 into `servant` (`Servant.API.Generic`),
130 `servant-client-code` (`Servant.Client.Generic`)
131 and `servant-server` (`Servant.Server.Generic`).
133- *servant-server* Deprecate `Servant.Utils.StaticUtils`, use `Servant.Server.StaticUtils`.
138- `Stream` takes a status code argument
141 -Stream method framing ctype a
142 +Stream method status framing ctype a
145 ([#966](https://github.com/haskell-servant/servant/pull/966)
146 [#972](https://github.com/haskell-servant/servant/pull/972))
148- `ToStreamGenerator` definition changed, so it's possible to write an instance
152 -class ToStreamGenerator f a where
153 - toStreamGenerator :: f a -> StreamGenerator a
154 +class ToStreamGenerator a b | a -> b where
155 + toStreamGenerator :: a -> StreamGenerator b
158 ([#959](https://github.com/haskell-servant/servant/pull/959))
160- Added `NoFraming` streaming strategy
161 ([#959](https://github.com/haskell-servant/servant/pull/959))
163- *servant-server* File serving in polymorphic monad.
164 i.e. Generalised types of `serveDirectoryFileServer` etc functions in
165 `Servant.Utils.StaticFiles`
166 ([#953](https://github.com/haskell-servant/servant/pull/953))
168- *servant-server* `ReqBody` content type check is recoverable.
169 This allows writing APIs like:
172 ReqBody '[JSON] Int :> Post '[PlainText] Int
173 :<|> ReqBody '[PlainText] Int :> Post '[PlainText] Int
176 which is useful when handlers are subtly different,
177 for example may do less work.
178 ([#937](https://github.com/haskell-servant/servant/pull/937))
184- Support `base-compat-0.10`
189- Streaming endpoint support.
190 ([#836](https://github.com/haskell-servant/servant/pull/836))
191- *servant* Add `Servant.API.Modifiers`
192 ([#873](https://github.com/haskell-servant/servant/pull/873))
199* Added `hoistServer` member to the `HasServer` class, which is `HasServer`
201 ([#804](https://github.com/haskell-servant/servant/pull/804))
208* Changed `HasServer` instances for `Header` to throw 400 when parsing fails
209 ([#724](https://github.com/haskell-servant/servant/pull/724))
210* Added `headersD` block to `Delayed`
211 ([#724](https://github.com/haskell-servant/servant/pull/724))
215* Add `err418`, `err422` error codes
216 ([#739](https://github.com/haskell-servant/servant/pull/739))
223* `Handler` is now an abstract datatype. Migration hint: change `throwE` to `throwError`.
224 ([#641](https://github.com/haskell-servant/servant/issues/641))
226* Changed `HasServer` instances for `QueryParam` and `QueryParam` to throw 400
228 ([#649](https://github.com/haskell-servant/servant/pull/649))
232* Added `paramsD` block to `Delayed`
234* Add `err422` Unprocessable Entity
235 ([#646](https://github.com/haskell-servant/servant/pull/646))
237* Deprecate `serveDirectory` and introduce `serveDirectoryFileServer`,
238 `serveDirectoryWebApp`, `serveDirectoryWebAppLookup`, `serveDirectoryEmbedded`
239 and `serveDirectoryWith` which offer 4 default options and a more flexible
240 one for serving static files.
241 ([#658](https://github.com/haskell-servant/servant/pull/658))
243* `DelayedIO` is an instance of `MonadResource`, allowing safe resource handling.
244 ([#622](https://github.com/haskell-servant/servant/pull/622)
245 , [#674](https://github.com/haskell-servant/servant/pull/674)
246 , [#675](https://github.com/haskell-servant/servant/pull/675))
251* Remove module `Servant.Server.Internal.Enter` (https://github.com/haskell-servant/servant/pull/478)
257* The `Router` type has been changed. Static router tables should now
258 be properly shared between requests, drastically increasing the
259 number of situations where servers will be able to route requests
260 efficiently. Functions `layout` and `layoutWithContext` have been
261 added to visualize the router layout for debugging purposes. Test
262 cases for expected router layouts have been added.
263* If an endpoint is discovered to have a non-matching "accept header",
264 this is now a recoverable rather than a fatal failure, allowing
265 different endpoints for the same route, but with different content
266 types to be specified modularly.
267* Export `throwError` from module `Servant`
268* Add `Handler` type synonym
273* If servers use the `BasicAuth` combinator and receive requests with missing or
274 invalid credentials, the resulting error responses (401 and 403) could be
275 overwritten by subsequent alternative routes. Now `BasicAuth` uses `FailFatal`
276 and the error responses can't be overwritten anymore.
281* Query parameters that can't be parsed result in a `400` (was `404`).
286* Add `Config` machinery (https://github.com/haskell-servant/servant/pull/327).
287 This is a breaking change, as the signatures of both `route`, `serve` and the
288 typeclass `HasServer` now take an additional parameter.
289* Support for the `HttpVersion`, `IsSecure`, `RemoteHost` and `Vault` combinators
290* Drop `EitherT` in favor of `ExceptT`
291* Use `http-api-data` instead of `Servant.Common.Text`
292* Remove matrix params.
293* Remove `RouteMismatch`.
294* Redefined constructors of `RouteResult`.
295* Added `Delayed` and related functions (`addMethodCheck`, `addAcceptCheck`, `addBodyCheck`, `runDelayed`)
296* Added support for Basic Authentication
297* Add generalized authentication support via the `AuthServerData` type family and `AuthHandler` handler
301* Bump attoparsec upper bound to < 0.14
302* Bump wai-app-static upper bound to < 3.2
303* Bump either upper bound to < 4.5
307* `Delete` now is like `Get`, `Post`, `Put`, and `Patch` and returns a response body
308* Add a `RouteMismatch` constructor for arbitrary HTTP response codes (https://github.com/haskell-servant/servant-server/pull/22)
309* Add support for the `Patch` combinator
310* Support for `Accept`/`Content-type` headers and for the content-type aware combinators in *servant-0.4*
311* Export `toApplication` from `Servant.Server` (https://github.com/haskell-servant/servant-server/pull/29)
312* Support other Monads than just `EitherT (Int, String) IO` (https://github.com/haskell-servant/servant-server/pull/21)
313* Make methods return status code 204 if they return () (https://github.com/haskell-servant/servant-server/issues/28)
314* Add server support for response headers
315* Use `ServantErr` instead of `(Int,String)` in `EitherT` handlers
316* Add `errXXX` functions for HTTP errors with sensible default reason strings
317* Add `enter` function for applying natural transformations to handlers
321* Added support for matrix parameters, see e.g. http://www.w3.org/DesignIssues/MatrixURIs.html
322* Add support for serializing based on Accept header
323 (https://github.com/haskell-servant/servant-server/issues/9)
324* Ignore trailing slashes
325 (https://github.com/haskell-servant/servant-server/issues/5)
331* Fix consuming request body issue
332 (https://github.com/haskell-servant/servant/issues/3)
333* Make code sample in Servant.Server complete
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list