Commit graph

36 commits

Author SHA1 Message Date
Giorgio Marinelli
29d2553e74
Derive HasClient good response status from Verb status (#1469) 2021-12-09 10:09:18 +01:00
Ian Shipman
9666f1956b Addresses problems with URL encodings
This changes the way URL encoding for query parameters is handled,
making it possible to correctly encode arbitrary binary data into query
parameter values.

Closes #1418
2021-10-03 09:57:55 -05:00
akhesaCaro
6e5dffbb91 unsupporting GHC < 8.6.5, removing unecessary imports 2021-10-02 13:13:24 +02:00
fisx
c1105899f4
union verbs (#1314) 2020-10-31 20:45:46 +01:00
Eric Torreborre
164ae93c31 added a function to create Client.Request in ClientEnv 2019-12-14 22:34:06 +02:00
Oleg Grenrus
52408fea16 Fix servant-client with base-compat-0.11 2019-09-30 10:34:33 +03:00
Oleg Grenrus
a5655f8d5a Rename ServantError to ClientError, ServantErr to ServerError 2019-02-18 22:51:09 +02:00
Oleg Grenrus
420ebd0475 Refactor servant-client-core
- No more Internal modules
- Remove ClientLike-generic. Let's use Routes-generics
    - Let's see if anyone notices, otherwise we can add it back
- Add Makefile for common tasks
    - Fix servant-client-ghcjs
2019-02-18 19:08:13 +02:00
Oleg Grenrus
4fab471c29 Refactor servant-client(-core)
- Rename GenResponse to ResponseF (analogous to RequestF)
- add NFData Headers
- Make Request and Response bodies be SourceIO,
  i.e. move conversions into specific implementations
2019-02-06 12:15:20 +02:00
Clement Delafargue
82a2c1f463 keep structured exceptions in ConnectionError
fixes #807
Previously, there were two levels of `SomeException` (see #714). A
test makes sure there is only one level of wrapping.
2019-02-05 12:46:06 +02:00
Oleg Grenrus
3a9a1ca55b Parametrise over body contents only 2019-02-05 11:51:42 +02:00
Ben Gamari
9a655fd68e client: Preserve failing request in FailureResponse
This was previously implemented in #470 but later unintentionally
reverted in #803. This isn't verbatim the design implemented earlier; we
now capture the full RequestF save the request body.

Fixes #978.
2019-02-03 12:09:18 -05:00
Michael Dunn
8490ccbe93 Do one atomic update to the cookie jar for all request and responses. 2019-01-26 22:13:32 -06:00
Michael Dunn
c33f27de04 updateCookieJar is now in STM to only allow for a single atomic update. 2019-01-26 18:01:53 -06:00
Michael Dunn
37a38d7a9b Cookies are added to the CookieJar for all intermediate/redirected requests. 2019-01-04 17:04:20 -06:00
Oleg Grenrus
8feda81fcd Separate Servant.Client.Streaming
- as a bonus only `servant-client` depends on `kan-extensions`
2018-11-08 17:58:21 +02:00
Oleg Grenrus
45c1cbdfd5 Refactor Stream stuff
- Introduce SourceT, which is simple variant of "correct `ListT`".
  There are another variants possible (like in `streaming`),
  but I'm not sure there's much real difference.

- Introduce `Codensity`. There's a flag if people don't want to depend
  on `kan-extensions`.

- `StreamGenerator` and `ResultStream` are both `SourceT`.
  `Stream` combinator in `servant-client` uses `Codensity` for CPS.

- Add servant-machines, servant-conduit, servant-pipes
- Add streaming cookbook: just code, no explanations.
- Add a script to run streaming 'benchmarks'
2018-11-05 15:48:47 +02:00
Oleg Grenrus
f9bcc15d0b Apply stylish-haskell on all modules 2018-06-29 23:36:39 +03:00
Alp Mestanogullari
fc3c6089b8 document hoistClient (haddocks, tutorial) 2018-04-04 01:48:48 +02:00
Alp Mestanogullari
200311ee26 add hoistClient to HasClient class 2018-04-04 01:48:48 +02:00
Julian K. Arni
37482d69d7 Test that Stream combinator doesn't blow up memory. 2018-03-19 16:26:57 +01:00
Oleg Grenrus
454f53315f Remove catchServantError 2018-03-11 16:50:14 +02:00
Oleg Grenrus
f4fc2b321f Refactor servant-client-core Response+StreamingResponse 2018-01-31 09:26:28 +02:00
Michal Rus
e4bd07a907 Support http-client’s CookieJar in servant-client 2018-01-26 18:45:52 +02:00
Oleg Grenrus
cbd3862f24
Merge pull request #836 from gbaz/gb-streaming
Stream endpoint support for servant
2017-12-03 17:19:47 +02:00
Oleg Grenrus
a67cd56c1f Send Accept header in servant-client
Fixes #858. The bug was introduced in servant-client-core refactor
(servant-client-0.12).

See 8973cf56f1/servant-client/src/Servant/Common/Req.hs (L151-L179)
for the unbroken variant in servant-client-0.11
2017-11-11 00:06:25 +02:00
Gershom
90292e1f62 move statuscheck earlier on streaming response to give good error 2017-11-06 11:37:00 -05:00
Gershom
e75a3cc37b streaming client actually streams 2017-10-24 17:12:21 -07:00
Joshua McCartney
3fedbd097a Fix issue #821 2017-09-28 19:15:53 -04:00
Julian K. Arni
1a67d93c60 Use own throw/catch 2017-09-15 14:57:03 -04:00
Julian K. Arni
65c2cbb6a9 Fix 7.8.4 IsList Sequence issue
And other minor 7.8.4 issues.
2017-09-14 11:23:42 -04:00
Julian K. Arni
da8337809b Documentation fixes 2017-09-14 09:54:13 -04:00
Julian K. Arni
e8b9814168 Documentation and Reexport module 2017-09-14 09:54:13 -04:00
Julian K. Arni
6be78e0b38 Documentation 2017-09-14 09:54:13 -04:00
Julian K. Arni
5bd9d253ce Almost compiling test 2017-09-14 09:54:13 -04:00
Julian K. Arni
75ea91c34d Fix some tests 2017-09-14 09:54:13 -04:00
Renamed from servant-client/src/Servant/Client/HttpClient.hs (Browse further)