Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

16 lines (14 sloc) 0.564 kb
{-# LANGUAGE OverloadedStrings #-}
import Network.Wai
import Network.Wai.Handler.Warp
import Network.Wai.Parse
import Data.ByteString.UTF8 (toString)
import Data.ByteString.Lazy.UTF8 (fromString)
main = run 3000 $ \req -> do
body <- parseRequestBody lbsSink req
return $ responseLBS status200 [("Content-Type", "plain")] $ fromString $ unlines
[ "Path info: " ++ toString (pathInfo req)
, "Query string: " ++ toString (queryString req)
, "Request body: " ++ show body
, "Method: " ++ toString (requestMethod req)
]
Jump to Line
Something went wrong with that request. Please try again.