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?

2
  • 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. Commented Jun 30, 2015 at 13:35
  • http-client doesn't support proxies with auth (at the moment), see github.com/snoyberg/http-client/issues/129. Commented Jun 30, 2015 at 15:34

1 Answer 1

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!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.