
12 Feb
2011
12 Feb
'11
4:12 a.m.
Hi Thomas,
What tripped me up was trying to figure out the enumerator part of the API so that I can read the request body (and turn it into a String) and run the XML-RPC request handler. Any help would be appreciated!
In Hoogle I use, responseLBS to construct responses (from Wai), and responseFlatten to deconstruct them: responseFlatten :: Response -> IO (Status, ResponseHeaders, LBString) responseFlatten r = responseEnumerator r $ \s hs -> do builders <- consume return (s, hs, toLazyByteString $ mconcat builders) Now you can avoid knowledge of anything to do with enumerators etc. (which I still don't understand!) Thanks, Neil