Commit graph

84 commits

Author SHA1 Message Date
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
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
Oleg Grenrus
28ac8c072b
Merge pull request #1104 from michaelsdunn1/master
Update CookieJar with intermediate request/responses using Network.HTTP.Client.HistoriedResponse.
2019-02-02 10:21:21 +02:00
Michael Dunn
07b3236eb6 Added Cookie in CookieJar after redirect test case to ClientSpec.hs. 2019-01-25 10:17:58 -06:00
Oleg Grenrus
b685efecbe Allow network-3.0 2019-01-23 02:20:16 +02: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
7634e08352 Make ComprehensiveAPI part of public API
We cannot simply tweak it, it will break tests of other packages.
Including packages not in this repository.
2018-11-06 13:35:47 +02:00
Oleg Grenrus
cfade67c2f Cleanup pre-GHC-8.0 stuff 2018-07-11 01:39:38 +03:00
Oleg Grenrus
f9bcc15d0b Apply stylish-haskell on all modules 2018-06-29 23:36:39 +03:00
Oleg Grenrus
dd7ec1dfd7 Allow base-compat-0.10.0 2018-04-11 11:26:14 +03:00
Alp Mestanogullari
9eb57a6119 add a test for hoistClient 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
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
bd7f6edb8b Try to add test for root client request 2017-11-06 14:11:05 +02:00
Gershom
38e87397e7 add tests, fix to make tests work 2017-11-04 00:10:29 -04:00
Julian K. Arni
e8b9814168 Documentation and Reexport module 2017-09-14 09:54:13 -04:00
Julian K. Arni
ffbfa42a14 Tests now pass 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
Arnaud Bailly
b592b51ed8 provide convenience functions for ClientM-based clients 2017-09-14 09:54:13 -04:00
Arnaud Bailly
5e2c48b08f expose client runner as a typeclass with base implementation #798
* defined a typeclass abstracting the execution of a query
* provide ClientM-based instances for this typeclass
* changed signature of client and clientWithRoute to add proxy for
  context
* updated tests
2017-09-14 09:54:13 -04:00
Arnaud Bailly
2665693529 extract module for http-client 2017-09-14 09:54:13 -04:00
David Turner
0bbc4f98a4 Rename EmptyAPIClient to EmptyClient 2017-05-16 16:00:15 +00:00
David Turner
f5d9983381 Rename emptyAPIServer to emptyServer 2017-05-16 15:59:41 +00:00
David Turner
e60bdadead Demonstrate that a client for EmptyAPI pattern-matches EmptyAPIClient 2017-05-16 10:21:37 +00:00
Alexander Vieth
6389134423 Change to ServerT Raw m = Tagged m Application
For uniformity of Enter.

Previously, `ServerT Raw m ~ Application`. Seems reasonable, but has the
unfortunate consequence of making `Enter` useless for `Raw` routes.
With this change `Tagged m Application` is retagged by `Enter`.
2017-05-15 19:54:43 +03:00
Stevan Andjelkovic
b8de9c8527 Include the request that failed in FailureResponse. 2017-05-05 15:31:38 +02:00
Catherine Galkina
af1b267726 Fix servant-client tests after rebase 2017-01-17 16:34:30 +03:00
Catherine Galkina
3cc667892c Add tests for Servant.Client.Generic 2017-01-17 16:29:24 +03:00
Oleg Grenrus
5168157757 Make Handler a newtype 2017-01-16 12:18:49 +02:00
Sönke Hahn
79f53cef3e servant-client: use base-compat in order to use less CPP 2016-10-17 11:52:40 -04:00
Julian K. Arni
501212e6b9 Review fixes 2016-09-12 20:40:03 -03:00
Julian K. Arni
0870b3b2f5 Remove FromFormUrlEncoded and ToFormUrlEncoded.
In favor of FromForm and ToForm from the new version of http-api-data.
2016-09-12 18:34:18 -03:00
Christian Klinger
7a7f7d7cf5 changed ClientM to be a Reader of ClientEnv 2016-09-08 00:17:13 +02:00
Jonathan Lange
d945c99f82 Test whole list in CaptureAll client tests 2016-07-11 14:47:05 +01:00
Jonathan Lange
7fb9a95711 servant-client support for CaptureAll 2016-07-11 14:46:31 +01:00
Julian Arni
ea36656dcd Merge pull request #505 from haskell-servant/jkarni/reexport-application
Re-export Application.
2016-05-12 10:38:46 +02:00
Julian K. Arni
211254512e Re-export Application. 2016-05-11 12:17:36 +02:00
Oleg Grenrus
008f2434ee Add -Wno-redundant-constraints 2016-05-10 19:09:59 +03:00
Sönke Hahn
b26bbfccda travis: enable -Wall -Werror 2016-04-21 13:06:10 +08:00
Luke Cycon
21546991af Introduce a Handler alias for ExceptT ServantErr IO
Fixes #434
2016-04-11 22:27:29 -07:00
mbg
9e1ba9221d Manager and BaseUrl are now explicit parameters of all client functions, instead of ReaderTs 2016-03-30 22:41:39 +01:00
mbg
41129e98b3 Removed GetNth and GetLast type classes 2016-03-28 18:01:53 +01:00
mbg
89b0758dc8 Changed servant-client tests to reflect the changes to the client function 2016-03-28 14:52:33 +01:00
aaron levin
b3af5a8d95 Move general authentication to Experimental module
Removes the UndecidableInstances extension in the module containing the
HasServer instances.
2016-03-09 22:30:34 +01:00
aaron levin
23da4879ef Add general auth support to servant-client 2016-03-09 22:30:34 +01:00
aaron levin
546adc391a basic-auth: config -> context 2016-03-08 23:28:27 +01:00
aaron levin
1e703be15f replace serve with serveWithConfig 2016-03-08 23:13:05 +01:00
aaron levin
d989d15e4c Add basic-auth support to servant-client 2016-03-08 23:13:05 +01:00