haskell/HTTP — Issue #22: Some documentation improvements
Author: raimohanska
Created: 2011-12-03 22:25:57+00:00
State: open

Thanks for the great library! I just replaced curl with HTTP in my project.. It went very well in general but here are some findings:

- Parameters for postRequestWithBody should be documented. Now it's just 3 strings the purpose of which I had to guess. I did but that's not the way it should be..
- Maybe a POST example should be put in the docs as well as a GET
- I'm not yet in love with response code split into 3 digits :)
- For me at least, it would make sense to have a getResponseCode function as well as getResponseBody function. I'm not saying this is a biggie though. Here's what I wrote for myself:

getResponseCode (Left err) = fail $ show err
getResponseCode (Right (Response (a, b, c) _ _ _)) = return $ a*100+b*10+c

As you can see, I converted the three digits into one Int, but that's just a matter of opinion, right..

Anyway, thanks for your great work!