Some helpers for parsing data out of a raw WAI Request
.
- parseHttpAccept :: ByteString -> [ByteString]
- parseRequestBody :: Sink x y -> Request -> Iteratee ByteString IO ([Param], [File y])
- data Sink x y = Sink {
- sinkInit :: IO x
- sinkAppend :: x -> ByteString -> IO x
- sinkClose :: x -> IO y
- sinkFinalize :: y -> IO ()
- lbsSink :: Sink ([ByteString] -> [ByteString]) ByteString
- tempFileSink :: Sink (FilePath, Handle) FilePath
- type Param = (ByteString, ByteString)
- type File y = (ByteString, FileInfo y)
- data FileInfo c = FileInfo {}
Documentation
parseHttpAccept :: ByteString -> [ByteString]Source
Parse the HTTP accept string to determine supported content types.
parseRequestBody :: Sink x y -> Request -> Iteratee ByteString IO ([Param], [File y])Source
A destination for data, the opposite of a Source
.
Sink | |
|
lbsSink :: Sink ([ByteString] -> [ByteString]) ByteStringSource
type Param = (ByteString, ByteString)Source
type File y = (ByteString, FileInfo y)Source
Information on an uploaded file.
FileInfo | |
|