haskell / HTTP

Haskell HTTP package

Home Page:http://hackage.haskell.org/package/HTTP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

simpleHTTP raises exception on "https"

vlatkoB opened this issue · comments

Hello,

In documentation for simpleHTTP it is not mentioned that it raises IO exception if url is "https" (through failHTTPS).
It should be mentioned in docs, or even better, it should catch it and return Left (maybe ErrorMisc).

Best regards,
vlatko

👍 for this, undocumented exception throwing is bad. (just got bitten by this)

With pull request #103 the behaviour changes from exception into Left result:

λ> import Network.HTTP
λ> Network.HTTP.simpleHTTP (getRequest "https://haskell.org")
Left (ErrorMisc "user error (https not supported)")