epicallan / hreq

A type dependent highlevel HTTP client library inspired by servant-client.
https://lukwagoallan.com/posts/http-requests-with-hreq
53 stars 3 forks source link

Question: checking response codes in RunClient? #28

Open jsoo1 opened 4 years ago

jsoo1 commented 4 years ago

Hi I just picked up your library, it’s really nice! I was wondering how I can do some extra parsing of a response if I know i can expect some body given a certain status code. I know I can work around it outside of RunClient, so no problem if there’s no solution. Thanks again!

epicallan commented 4 years ago

Hi, I am glad you like the library. :)

To your question, there is currently no straight forward solution at the moment. I would need to provide some new combinator for making it easier to write custom HasResponse class instances for such cases. I will explore it over the weekend.

jsoo1 commented 4 years ago

Thank you very much! Good luck and I'll keep an eye out for it.