WAI, HTTP POST , POST request body extract
Hi Michael. Please explain how to extract POST data from WAI Request. Thanks. -- Best regards, Cheshkov Anton Phone: +7 909 005 18 82 Skype: cheshkov_anton
I have found myself. It is example to extract all Request POST data and return it in Response *import qualified Data.ByteString.Char8 as C* *import Network.Wai.Parse (parseRequestBody, lbsSink)* *main = run 3000 app* * * *app req = do* * (params, _) <- parseRequestBody lbsSink req* * let r = C.concat $ map (\(x,y) -> C.concat [x,y]) params* * return $ ResponseBuilder * * status200* * [("Content-Type", "text/plain")]* * $ copyByteString r* 2011/3/6 Антон Чешков <acheshkov@gmail.com>
Hi Michael. Please explain how to extract POST data from WAI Request.
Thanks.
-- Best regards, Cheshkov Anton Phone: +7 909 005 18 82 Skype: cheshkov_anton
-- Best regards, Cheshkov Anton Phone: +7 909 005 18 82 Skype: cheshkov_anton
participants (1)
-
Антон Чешков