Look at the docs on the checkStatus field of Request. It allows controlling whether an exception is thrown.
On Sun, Jul 12, 2015, 11:32 AM Sevcsik András <sevcsik@gmail.com> wrote:Hi list,Is there any way to read the response body of an >=400 HTTP response with http-client?If the response is an error response, it throws a StatusCodeException [1], which only exposes the headers, not the whole Response value.However, CouchDB gives a response body for the error responses, describing the error, which I want to access.Cheers--Minden jót,Sevcsik András______________________________________________________________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners