4

I'm using the simple example from HTTP.Conduit's documentation found here.

   import Network.HTTP.Conduit
   import qualified Data.ByteString.Lazy as L
   main = simpleHttp "http://www.haskell.org/" >>= L.putStr

My system requires a proxy which is set with the environmental variable http_proxy and has the form http://user:pass@proxy:port/.

Http.Conduit results in an exception with the error:

  *** Exception: InvalidProxyEnvironmentVariable "http_proxy" "http://user:pass@proxy:port/"

(I've changed the details for the proxy..)

What is the issue? Does Http.Conduit not support authentication?

  • Meanwhile, if you have the same issue and need some way to get data via HTTP, you can consider using `Network.Curl` which given a test I just did seems to work even with proxy settings for the obvious reasons. –  Jun 30 '15 at 13:35
  • `http-client` doesn't support proxies with auth (at the moment), see https://github.com/snoyberg/http-client/issues/129. – Zeta Jun 30 '15 at 15:34

1 Answers1

4

This is a limitation of http-client, which has now been reported and resolved. This change will get released to Hackage in the next few days, testing and success reports welcome!

Michael Snoyman
  • 31,100
  • 3
  • 48
  • 77