Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Internal constructors and helper functions. Note that no guarantees are given for stability of these interfaces.
Synopsis
- data Request = Request {
- requestMethod :: Method
- httpVersion :: HttpVersion
- rawPathInfo :: ByteString
- rawQueryString :: ByteString
- requestHeaders :: RequestHeaders
- isSecure :: Bool
- remoteHost :: SockAddr
- pathInfo :: [Text]
- queryString :: Query
- requestBody :: IO ByteString
- vault :: Vault
- requestBodyLength :: RequestBodyLength
- requestHeaderHost :: Maybe ByteString
- requestHeaderRange :: Maybe ByteString
- requestHeaderReferer :: Maybe ByteString
- requestHeaderUserAgent :: Maybe ByteString
- getRequestBodyChunk :: Request -> IO ByteString
- setRequestBodyChunks :: IO ByteString -> Request -> Request
- data Response
- type StreamingBody = (Builder -> IO ()) -> IO () -> IO ()
- data RequestBodyLength
- data FilePart = FilePart {}
- data ResponseReceived = ResponseReceived
Documentation
Information on the request sent by the client. This abstracts away the details of the underlying implementation.
Request | |
|
getRequestBodyChunk :: Request -> IO ByteString Source #
Get the next chunk of the body. Returns empty
when the
body is fully consumed.
Since: 3.2.2
setRequestBodyChunks :: IO ByteString -> Request -> Request Source #
Set the requestBody
attribute on a request without triggering a
deprecation warning.
The supplied IO action should return the next chunk of the body each time it
is called and empty
when it has been fully consumed.
Since: 3.2.4
type StreamingBody = (Builder -> IO ()) -> IO () -> IO () Source #
Represents a streaming HTTP response body. It's a function of two parameters; the first parameter provides a means of sending another chunk of data, and the second parameter provides a means of flushing the data to the client.
Since: 3.0.0
data RequestBodyLength Source #
The size of the request body. In the case of chunked bodies, the size will not be known.
Since: 1.4.0
Instances
Show RequestBodyLength Source # | |
Defined in Network.Wai.Internal showsPrec :: Int -> RequestBodyLength -> ShowS # show :: RequestBodyLength -> String # showList :: [RequestBodyLength] -> ShowS # |
Information on which part to be sent.
Sophisticated application handles Range (and If-Range) then
create FilePart
.
Since: 0.4.0
data ResponseReceived Source #
A special datatype to indicate that the WAI handler has received the response. This is to avoid the need for Rank2Types in the definition of Application.
It is highly advised that only WAI handlers import and use the data constructor for this data type.
Since: 3.0.0