On 16.11.2007, at 13:55, Jim Burton wrote:
The docs say "Should be of the form http://host:port, host,
host:port, or
http://host" but none of the variations work. Any ideas where I
might find
an example of code that does this?
this works for me (modulo error handling):
simpleHTTP' :: Request -> IO (Result Response)
simpleHTTP' req = do
proxy <- catch
(getEnv "HTTP_PROXY" >>= return . (flip Proxy Nothing))
(\_ -> return NoProxy)
(_, resp) <- browse (setProxy proxy >> request req)
return (Right resp)
i.e. run the request in the browser monad.
<sk>
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe