
On Thu, May 12, 2011 at 6:08 AM, Erik de Castro Lopo
Erik de Castro Lopo wrote:
Erik de Castro Lopo wrote:
Clues? Would this need a new http-enumerator function something like:
This is mainly an FYI. I've been doing a little hacking on this. I've defined a Proxy data type as:
data Proxy = Proxy { proxyHost :: W.Ascii -- ^ The host name of the HTTP proxy. , proxyPort :: Int -- ^ The port numner of the HTTP proxy. } deriving (Show)
I then copied the http function to produce a function proxyHttp:
proxyHttp :: MonadIO m => Proxy -> Request m -> (W.Status -> W.ResponseHeaders -> Iteratee S.ByteString m a) -> Manager -> Iteratee S.ByteString m a
which can now do a GET via a Squid proxy to HTTP server.
I've implemented four functions; proxyHttp, proxyHttpLbs, proxyHttpRedirect and proxyHttpLbsRedirect but it occurs to me that if we added a field of type 'Maybe Proxy' to the 'Request m' data type, the fucntionality of the four functions I have hacked up could be merged with the original versions of these.
Does that sound like a sane approach?
Yes, I think that sounds good. Just let me know when I should look at the code; I'm impressed how quickly you're getting this done!
Michael
Cheers, Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
_______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel