on no-mimerender-overlap help sign in
277 lines 9.6 kB history raw
1[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-client-core/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)
40.18.3
5------
7### Significant changes
9- Add response header support to UVerb (#1420)
11### Other changes
13- Support GHC-9.0.1.
14- Bump `bytestring`, `hspec`, `base64-bytestring` and `QuickCheck` dependencies.
160.18.2
17------
19### Significant changes
21- Support `Fragment` combinator.
230.18.1
24------
26### Significant changes
28- Union verbs
30### Other changes
32- Bump "tested-with" ghc versions
33- Loosen bound on base16-bytestring
350.18
36----
38### Significant changes
40- Support for ghc8.8 (#1318, #1326, #1327)
430.17
44----
46### Significant changes
48- 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)
50 The `NoContent` API endpoints should now use `NoContentVerb` combinator.
51 The API type changes are usually of the kind
53 ```diff
54 - :<|> PostNoContent '[JSON] NoContent
55 + :<|> PostNoContent
56 ```
58 i.e. one doesn't need to specify the content-type anymore. There is no content.
60- `Capture` can be `Lenient` [#1155](https://github.com/haskell-servant/servant/issues/1155) [#1156](https://github.com/haskell-servant/servant/pull/1156)
62 You can specify a lenient capture as
64 ```haskell
65 :<|> "capture-lenient" :> Capture' '[Lenient] "foo" Int :> GET
66 ```
68 which will make the capture always succeed. Handlers will be of the
69 type `Either String CapturedType`, where `Left err` represents
70 the possible parse failure.
72### Other changes
74- *servant-client* *servant-client-core* *servant-http-streams* Fix Verb with headers checking content type differently [#1200](https://github.com/haskell-servant/servant/issues/1200) [#1204](https://github.com/haskell-servant/servant/pull/1204)
76 For `Verb`s with response `Headers`, the implementation didn't check
77 for the content-type of the response. Now it does.
79- *servant-client* *servant-http-streams* `HasClient` instance for `Stream` with `Headers` [#1170](https://github.com/haskell-servant/servant/issues/1170) [#1197](https://github.com/haskell-servant/servant/pull/1197)
80- *servant-client* Redact the authorization header in Show and exceptions [#1238](https://github.com/haskell-servant/servant/pull/1238)
820.16
83----
85- Rename `ServantError` to `ClientError`, `ServantErr` to `ServerError`
86 [#1131](https://github.com/haskell-servant/servant/pull/1131)
88- *servant-client-core* Rearrange modules. No more `Internal` modules, whole
89 API is versioned.
90 [#1130](https://github.com/haskell-servant/servant/pull/1130)
92- *servant-client-core* `RequestBody` is now
94 ```haskell
95 = RequestBodyLBS LBS.ByteString
96 | RequestBodyBS BS.ByteString
97 | RequestBodySource (SourceIO LBS.ByteString)
98 ```
100 i.e. no more replicates `http-client`s API.
101 [#1117](https://github.com/haskell-servant/servant/pull/1117)
103- *servant-client-core* Keep structured exceptions in `ConnectionError`
104 constructor of `ClientError`
105 [#1115](https://github.com/haskell-servant/servant/pull/1115)
107 ```diff
108 -| ConnectionError Text
109 +| ConnectionError SomeException
110 ```
112- *servant-client-core* Preserve failing request in `FailureResponse`
113 constructor of `ClientError`
114 [#1114](https://github.com/haskell-servant/servant/pull/1114)
116 ```diff
117 -FailureResponse Response
118 +-- | The server returned an error response including the
119 +-- failing request. 'requestPath' includes the 'BaseUrl' and the
120 +-- path of the request.
121 +FailureResponse (RequestF () (BaseUrl, BS.ByteString)) Response
122 ```
124- *servant-client* Fix (implement) `StreamBody` instance
125 [#1110](https://github.com/haskell-servant/servant/pull/1110)
127- *servant-client* Update CookieJar with intermediate request/responses (redirects)
128 [#1104](https://github.com/haskell-servant/servant/pull/1104)
1300.15
131----
133- Streaming refactoring.
134 [#991](https://github.com/haskell-servant/servant/pull/991)
135 [#1076](https://github.com/haskell-servant/servant/pull/1076)
136 [#1077](https://github.com/haskell-servant/servant/pull/1077)
138 The streaming functionality (`Servant.API.Stream`) is refactored to use
139 `servant`'s own `SourceIO` type (see `Servant.Types.SourceT` documentation),
140 which replaces both `StreamGenerator` and `ResultStream` types.
142 New conversion type-classes are `ToSourceIO` and `FromSourceIO`
143 (replacing `ToStreamGenerator` and `BuildFromStream`).
144 There are instances for *conduit*, *pipes* and *machines* in new packages:
145 [servant-conduit](https://hackage.haskell.org/package/servant-conduit)
146 [servant-pipes](https://hackage.haskell.org/package/servant-pipes) and
147 [servant-machines](https://hackage.haskell.org/package/servant-machines)
148 respectively.
150 Writing new framing strategies is simpler. Check existing strategies for examples.
152 This change shouldn't affect you, if you don't use streaming endpoints.
154- *servant-client* Separate streaming client.
155 [#1066](https://github.com/haskell-servant/servant/pull/1066)
157 We now have two `http-client` based clients,
158 in `Servant.Client` and `Servant.Client.Streaming`.
160 Their API is the same, except for
161 - `Servant.Client` **cannot** request `Stream` endpoints.
162 - `Servant.Client` is *run* by direct
163 `runClientM :: ClientM a -> ClientEnv -> IO (Either ServantError a)`
164 - `Servant.Client.Streaming` **can** request `Stream` endpoints.
165 - `Servant.Client.Streaming` is *used* by CPSised
166 `withClientM :: ClientM a -> ClientEnv -> (Either ServantError a -> IO b) -> IO b`
168 To access `Stream` endpoints use `Servant.Client.Streaming` with
169 `withClientM`; otherwise you can continue using `Servant.Client` with `runClientM`.
170 You can use both too, `ClientEnv` and `BaseUrl` types are same for both.
172 **Note:** `Servant.Client.Streaming` doesn't *stream* non-`Stream` endpoints.
173 Requesting ordinary `Verb` endpoints (e.g. `Get`) will block until
174 the whole response is received.
176 There is `Servant.Client.Streaming.runClientM` function, but it has
177 restricted type. `NFData a` constraint prevents using it with
178 `SourceT`, `Conduit` etc. response types.
180 ```haskell
181 runClientM :: NFData a => ClientM a -> ClientEnv -> IO (Either ServantError a)
182 ```
184 This change shouldn't affect you, if you don't use streaming endpoints.
186- *servant-client-core* Related to the previous:
187 `streamingResponse` is removed from `RunClient`.
188 We have a new type-class:
190 ```haskell
191 class RunClient m => RunStreamingClient m where
192 withStreamingRequest :: Request -> (StreamingResponse -> IO a) -> m a
193 ```
195- Drop support for GHC older than 8.0
196 [#1008](https://github.com/haskell-servant/servant/pull/1008)
197 [#1009](https://github.com/haskell-servant/servant/pull/1009)
199- *servant-client-core* Add `NFData (GenResponse a)` and `NFData ServantError` instances.
200 [#1076](https://github.com/haskell-servant/servant/pull/1076)
202- *servant-client-core* Add `aeson` and `Lift BaseUrl` instances
203 [#1037](https://github.com/haskell-servant/servant/pull/1037)
2050.14.1
206------
208- Merge in `servant-generic` (by [Patrick Chilton](https://github.com/chpatrick))
209 into `servant` (`Servant.API.Generic`),
210 `servant-client-code` (`Servant.Client.Generic`)
211 and `servant-server` (`Servant.Server.Generic`).
2130.14
214----
216- `Stream` takes a status code argument
218 ```diff
219 -Stream method framing ctype a
220 +Stream method status framing ctype a
221 ```
223 ([#966](https://github.com/haskell-servant/servant/pull/966)
224 [#972](https://github.com/haskell-servant/servant/pull/972))
226- `ToStreamGenerator` definition changed, so it's possible to write an instance
227 for conduits.
229 ```diff
230 -class ToStreamGenerator f a where
231 - toStreamGenerator :: f a -> StreamGenerator a
232 +class ToStreamGenerator a b | a -> b where
233 + toStreamGenerator :: a -> StreamGenerator b
234 ```
236 ([#959](https://github.com/haskell-servant/servant/pull/959))
238- Added `NoFraming` streaming strategy
239 ([#959](https://github.com/haskell-servant/servant/pull/959))
241- *servant-client-core* Free `Client` implementation.
242 Useful for testing `HasClient` instances.
243 ([#920](https://github.com/haskell-servant/servant/pull/920))
245- *servant-client-core* Add `hoistClient` to `HasClient`.
246 Just like `hoistServer` allows us to change the monad in which request handlers
247 of a web application live, we also have `hoistClient` for changing the monad
248 in which *client functions* live.
249 Read [tutorial section for more information](https://docs.servant.dev/en/release-0.14/tutorial/Client.html#changing-the-monad-the-client-functions-live-in).
250 ([#936](https://github.com/haskell-servant/servant/pull/936))
252 iF you have own combinators, you'll need to define a new method of
253 `HasClient` class, for example:
255 ```haskell
256 type Client m (MyCombinator :> api) = MyValue :> Client m api
257 hoistClientMonad pm _ nt cl = hoistClientMonad pm (Proxy :: Proxy api) nt . cl
258 ```
2600.13.0.1
261--------
263- Support `base-compat-0.10`
2650.13
266----
268- Streaming endpoint support.
269 ([#836](https://github.com/haskell-servant/servant/pull/836))
270- *servant* Add `Servant.API.Modifiers`
271 ([#873](https://github.com/haskell-servant/servant/pull/873))
2730.12
274----
276- First version. Factored out of `servant-client` all the functionality that was
277 independent of the `http-client` backend.