I'm trying to figure out how make a basic GET request using Network.HTTP.simpleHTTP that will use a proxy.
I have tried setting the http_proxy environment variable, and I think I understand how to make a Proxy using Network.HTTP.Proxy. But there seems to be nothing in the API on Hackage for how to set a simpleHTTP call or Request type to use a proxy.
The current code I have is:
import Network.HTTP
import Network.HTTP.Proxy
import Data.Maybe
main = do
let proxy = fromJust $ parseProxy "proxyserver.foo.com:80"
x <- simpleHTTP (getRequest "http://www.google.com") >>= getResponseBody
print x