This is what is in HTTPbis/Network/Browser.hs > do > rsp <- Network.Browser.browse $ do > setAllowRedirects True -- handle HTTP redirects > request $ getRequest "http://google.com/" > fmap (take 100) (getResponseBody rsp)
And how I changed it slightly to test it out > import Network.HTTP > import Network.Browser > main = > do > rsp <- Network.Browser.browse $ do > setAllowRedirects True -- handle HTTP redirects > request $ getRequest "http://google.com/" > fmap (take 100) (getResponseBody rsp) but I got this errortest.lhs:10:39: Couldn't match expected type `Network.Stream.Result (Response [a])' against inferred type `(Network.URI.URI, Response String)' In the first argument of `getResponseBody', namely `rsp' In the second argument of `fmap', namely `(getResponseBody rsp)' In the expression: fmap (take 100) (getResponseBody rsp) how did I get this error? I'm perplexed as this came right from the source. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
