on master help sign in
Add initial HTTP/2-aware Application type
e73cd98Andrew Pritchard
wai/Network/Wai/HTTP2.hsnew file+15
@@ -0,0 +1,15 @@
1+module Network.Wai.HTTP2
2+ ( Http2Application
3+ , Trailers
4+ ) where
5+
6+import qualified Network.HTTP.Types as H
7+
8+import Network.Wai.Internal (Request, Response, ResponseReceived)
9+
10+-- | Headers sent after the end of a data stream, as defined by section 4.1.2 of
11+-- the HTTP\/1.1 spec (RFC 7230), and section 8.1 of the HTTP\/2 spec.
12+type Trailers = H.ResponseHeaders
13+
14+-- | The HTTP\/2-aware equivalent of 'Network.Wai.Application'.
15+type Http2Application = Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived
wai/wai.cabal+1
@@ -27,6 +27,7 @@ Library
27 , text >= 0.7
27 , text >= 0.7
28 , vault >= 0.3 && < 0.4
28 , vault >= 0.3 && < 0.4
29 Exposed-modules: Network.Wai
29 Exposed-modules: Network.Wai
30+ Network.Wai.HTTP2
30 Network.Wai.Internal
31 Network.Wai.Internal
31 ghc-options: -Wall
32 ghc-options: -Wall
32
33