[Haskell-cafe] proxy settings with simpleHttp

Michael Snoyman michael at snoyman.com
Mon Jan 2 17:37:39 CET 2012


On Mon, Jan 2, 2012 at 6:31 PM, hanjoosten <han.joosten at atos.net> wrote:
> Hi,
>
> I am fiddling around with the package http-enumerator to download web pages.
> I was used to `simpleHttp` do do that. However, I would like to infuence the
> proxy settings, because sometimes I am behind a firewall.
>
> Is there a simple way to do this?
>
> Thanks!
>
> Han.
>
> --
> View this message in context: http://haskell.1045720.n5.nabble.com/proxy-settings-with-simpleHttp-tp5114946p5114946.html
> Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

You'll need to drop down one layer and use httpLbsRedirect. You can
look at the code of simpleHttp[1] and add your proxy settings there.
Do people think it would be a good idea to expose an extra function
that has the same semantics as simpleHttp but takes a Request instead
of a String? Any ideas on names?

Michael

[1] http://hackage.haskell.org/packages/archive/http-conduit/1.0.0/doc/html/src/Network-HTTP-Conduit.html#simpleHttp



More information about the Haskell-Cafe mailing list