
19 Nov
2007
19 Nov
'07
7:19 p.m.
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>