Commit graph

40 commits

Author SHA1 Message Date
Oleg Grenrus
5168157757 Make Handler a newtype 2017-01-16 12:18:49 +02:00
Oleg Grenrus
cfaa7a06be Merge pull request #665 from phadej/client-monad-control
Add MonadBaseControl IO ClientM instance
2017-01-16 10:25:35 +02:00
Oleg Grenrus
b548f8df86 Add MonadBaseControl IO ClientM instance 2017-01-16 09:51:39 +02:00
Andres Loeh
bc04d120ec Allow more flexbility in setting the request body.
Rather than hard-coding the `RequestBodyLBS` constructor and be
limited to lazy bytestrings, the new function `setReqBody` just
takes any value of type `RequestBody`.

The old function `setRQBody` has been renamed to `setReqBodyLBS`.
The old name is still available, but deprecated.

The change has the advantage the we can define new servant API
combinators that use streaming request bodies such as for example
constructed by the `streamFile` function in http-client.

The behaviour for the existing `ReqBody` API combinator is
unaffected by this change.
2017-01-12 14:08:50 +01:00
Oleg Grenrus
1abf84feca servant-client asks for any content-type in Accept contentTypes ne-list 2016-11-10 21:22:00 +02:00
Hamish Mackenzie
49931913c9 Derive MonadThrow and MonadCatch for ClientM 2016-10-27 22:32:41 +13:00
Sönke Hahn
79f53cef3e servant-client: use base-compat in order to use less CPP 2016-10-17 11:52:40 -04:00
Christian Klinger
7a7f7d7cf5 changed ClientM to be a Reader of ClientEnv 2016-09-08 00:17:13 +02:00
Sönke Hahn
b1f143010e servant-client: fix compilation when building with http-client < 0.4.30 2016-08-14 20:27:50 +02:00
Oleg Grenrus
197ed0548a Use parseRequest 2016-07-18 14:40:05 +02:00
Sönke Hahn
d45c7c5897 support http-client-0.5 2016-07-09 18:36:00 +02:00
Julian K. Arni
023368c396 CPP deprecated parseUrl function. 2016-07-03 22:43:52 +08:00
Sönke Hahn
29be5761ce servant-client: add Eq instance for ServantError 2016-04-21 15:27:08 +08: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
7379b7486a Moved BaseUrl and Manager parameters from the client function to the Client type as discussed in #428 2016-03-28 14:51:07 +01:00
aaron levin
d989d15e4c Add basic-auth support to servant-client 2016-03-08 23:13:05 +01:00
Julian K. Arni
f1b6603c52 Review fixes 2016-01-08 18:03:28 +01:00
Julian K. Arni
cda8bcf17c Simplify verb combinators.
Create a single 'Verb' combinator with parameters for status code and
        method. Make existing combinators type synonyms of 'Verb'.
2016-01-07 13:47:07 +01:00
Julian K. Arni
afc76b8f6c Remove MatrixParam.
In servant, servant-server, and servant-client.
2015-10-13 21:37:07 +02:00
Julian K. Arni
c2a06bc090 More generous acceptable status codes for servant-client 2015-10-11 21:12:05 +02:00
Alp Mestanogullari
444a72eac6 Merge pull request #245 from arianvp/servant-client-hspec-discover-fix
Fix servant-client tests to properly use hspec-discover.
2015-10-10 02:40:24 +02:00
Nickolay Kudasov
40d2c68897 Use http-api-data package instead of ToText/FromText 2015-10-08 00:38:47 +03:00
Julian K. Arni
110196e23f Fix path concatenation, Eq instance, for BaseUrl 2015-10-07 21:07:07 +02:00
Julian K. Arni
de447dfe22 Pass in Manager as argument to 'client' 2015-09-28 16:34:53 +02:00
Index Int
f2f7b061d2 Drop EitherT in favor of ExceptT 2015-09-12 15:11:24 +03:00
Taylor Fausak
4238a58f92 Fix #203; add path to BaseUrl 2015-08-25 08:42:13 -05:00
Julian K. Arni
6eb7add53a stylish haskell changes
And import fix.
2015-08-18 00:07:12 +02:00
Julian K. Arni
98b6e85128 Contributing 2015-08-17 23:50:42 +02:00
Christian Marie
a4bf32c51a servant-client: Hide HttpException by wrapping it in SomeException 2015-06-12 21:19:26 +10:00
Christian Marie
ad16c4f768 Merge branch 'master' into existential-error 2015-06-12 19:56:49 +10:00
Pierre Radermecker
3bcbe80c37 Fix for GHC-7.8.x 2015-05-29 11:13:10 +02:00
Pierre Radermecker
520519bca9 Remove deps on HttpException from http-client 2015-05-27 15:36:28 +02:00
Pierre Radermecker
15b54cf1d0 Add AutoDeriveTypeable for ghc < 7.10 2015-05-27 15:36:28 +02:00
Pierre Radermecker
076286c37b Add a Exception instance for ServantError 2015-05-27 15:36:28 +02:00
Pierre Radermecker
717b18df4e Use MonadThrow instead of Either in the signature of parseBaseUrl 2015-05-27 15:36:28 +02:00
Timo von Holtz
ed7d235b26 Don't export HttpException 2015-05-25 17:51:35 +10:00
Julian K. Arni
45f8c2c458 Fix variable shadowing 2015-05-03 00:32:59 +02:00
Julian K. Arni
5531ada22b Headers for all 2015-05-02 02:21:03 +01:00
Julian K. Arni
f82ca76f7d 7.10 changes 2015-04-22 12:27:18 +02:00
Julian K. Arni
45f35852f8 prepare merge 2015-04-20 11:15:58 +02:00