Safe Haskell | Safe-Infered |
---|
Some helpers for parsing data out of a raw WAI Request
.
- parseHttpAccept :: ByteString -> [ByteString]
- parseRequestBody :: BackEnd y -> Request -> ResourceT IO ([Param], [File y])
- data RequestBodyType
- getRequestBodyType :: Request -> Maybe RequestBodyType
- sinkRequestBody :: BackEnd y -> RequestBodyType -> Sink ByteString IO ([Param], [File y])
- conduitRequestBody :: BackEnd y -> RequestBodyType -> Conduit ByteString IO (Either Param (File y))
- lbsBackEnd :: BackEnd ByteString
- tempFileBackEnd :: BackEnd FilePath
- data BackEnd y = forall x . BackEnd {
- initialize :: IO x
- append :: x -> ByteString -> IO x
- close :: x -> IO y
- finalize :: y -> IO ()
- type Param = (ByteString, ByteString)
- type File y = (ByteString, FileInfo y)
- data FileInfo c = FileInfo {}
- lbsSink :: BackEnd ByteString
- tempFileSink :: BackEnd FilePath
Documentation
parseHttpAccept :: ByteString -> [ByteString]Source
Parse the HTTP accept string to determine supported content types.
sinkRequestBody :: BackEnd y -> RequestBodyType -> Sink ByteString IO ([Param], [File y])Source
conduitRequestBody :: BackEnd y -> RequestBodyType -> Conduit ByteString IO (Either Param (File y))Source
lbsBackEnd :: BackEnd ByteStringSource
Store uploaded files in memory
tempFileBackEnd :: BackEnd FilePathSource
Save uploaded files on disk as temporary files
A destination for file data, with concrete implemtations
provided by lbsBackEnd
and tempFileBackEnd
type Param = (ByteString, ByteString)Source
type File y = (ByteString, FileInfo y)Source
Information on an uploaded file.
FileInfo | |
|
Deprecated
lbsSink :: BackEnd ByteStringSource
This function has been renamed to lbsBackEnd
tempFileSink :: BackEnd FilePathSource
This function has been renamed to tempFileBackEnd