Quantcast

proxy settings with simpleHttp

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

proxy settings with simpleHttp

hanjoosten
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: proxy settings with simpleHttp

Michael Snoyman
On Mon, Jan 2, 2012 at 6:31 PM, hanjoosten <[hidden email]> 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
> [hidden email]
> 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

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Loading...