Commit graph

24 commits

Author SHA1 Message Date
Mateusz Kowalczyk
d21f0bbbfc Accept wider range of return codes
DELETE
201 doesn't make sense
I think we can get away with just 204 without 205 and 206

GET
206 should be handled by the lib itself (?) so we only add 203

Closes #20
2015-03-25 15:39:55 +00:00
Timo von Holtz
74b5bc400c Allow more response codes without failing 2015-03-09 17:04:31 +11:00
Timo von Holtz
8015906b53 Record accessors for ServantError 2015-03-09 14:42:07 +11:00
Timo von Holtz
ba46ecc0a9 Use ServantError to report Errors instead of String 2015-03-09 14:42:07 +11:00
Timo von Holtz
aeb1136658 Use an IORef rather than a MVar.
The job of a manager is to synchronize threads, so it is not necessary to block.
2015-03-05 09:49:15 +11:00
Timo von Holtz
da0e1ca871 Extend tests and clean up 2015-02-25 09:56:06 +11:00
Timo von Holtz
40a941e0e3 Don't ignore the content-type in ReqBody 2015-02-25 09:30:31 +11:00
Timo von Holtz
48030a6a1b Simple design for client with content-types 2015-02-17 17:17:10 +11:00
Timo von Holtz
6c99dfcb6c Cleanup 2015-02-17 13:50:50 +11:00
Timo von Holtz
a23204e134 Use renderHeader to render the Accept header 2015-02-17 12:23:03 +11:00
Timo von Holtz
098b503625 Don't send an Accept header if the list of accepted types is empty 2015-02-17 11:56:15 +11:00
Timo von Holtz
c444ec8374 Send the correct Accept header 2015-02-17 11:51:59 +11:00
Timo von Holtz
e6e67b275b Check for correct content-type in result. 2015-02-17 10:55:35 +11:00
Timo von Holtz
db2c5a42b2 Expose content type in response. 2015-02-17 10:32:15 +11:00
Timo von Holtz
7a1eac4e86 Correctly set the content type for ReqBody 2015-02-17 10:05:39 +11:00
Matthias Fischmann
3b48ca7d43 Cleanup. 2015-02-06 09:34:59 +01:00
Christian Marie
cdbe95bcdf Merge branch 'tvh-support-tls' 2015-02-02 12:39:55 +11:00
Timo von Holtz
56e68bc737 Don't try to parse the empty response body for Delete 2015-01-30 17:05:01 +11:00
Timo von Holtz
4228447e91 Add TLS support 2015-01-23 09:18:13 +11:00
Daniel Larsson
8aba885488 Added support for matrix parameters. 2015-01-01 23:43:29 +01:00
Daniel Larsson
83afdcb96b Declared query string parameters are always sent in requests, even when no value is assigned to them (?name). The server handles a missing query parameter, and a query parameter with no value the same, but to be consistent with the documentation ("If you give Nothing, nothing will be added to the query string.") I made a small change to avoid sending empty query parameters. Also the value and req' parameters were flipped in the lambda in the QueryParams case. 2015-01-01 15:14:07 +01:00
Alp Mestanogullari
2ecc6124b0 add HasClient instance for Header 2014-12-08 12:52:30 +01:00
Alp Mestanogullari
530797eb42 clarify haddocks for HasClient 2014-12-01 13:41:12 +01:00
Alp Mestanogullari
d93e4620d4 first shot at splitting servant into servant, servant-client and servant-docs 2014-11-27 18:28:01 +01:00