simpleHTTP raises exception on "https"
vlatkoB opened this issue · comments
vlatkoB commented
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
Ömer Sinan Ağacan commented
👍 for this, undocumented exception throwing is bad. (just got bitten by this)
Ossi Herrala commented
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)")