on master help sign in
Doc fix, added status201
2157678Michael Snoyman
Network/Wai.hs+9−7
@@ -7,13 +7,10 @@ This module defines a generic web application interface. It is a common
7protocol between web servers and web applications.
7protocol between web servers and web applications.
8
8
9The overriding design principles here are performance and generality . To
9The overriding design principles here are performance and generality . To
10−address performance, this library is built on 'Source' for the request body and
10+address performance, this library is built on top of the enumerator package.
11−'Enumerator' for the response bodies. The advantages of this approach over lazy
12−IO have been debated elsewhere.
11+The advantages of this approach over lazy IO have been debated elsewhere.
13−
12+However, helper functions like 'responseLBS' allow you to continue using lazy
14−Nonetheless, many people find these data structures difficult to work with. For
13+IO if you so desire.
15−that reason, this library includes the "Network.Wai.Enumerator" module to
16−provide more familiar abstractions, including lazy IO.
17
14
18Generality is achieved by removing many variables commonly found in similar
15Generality is achieved by removing many variables commonly found in similar
19projects that are not universal to all servers. The goal is that the 'Request'
16projects that are not universal to all servers. The goal is that the 'Request'
@@ -50,6 +47,7 @@ module Network.Wai
50 -- ** Response status code
47 -- ** Response status code
51 , Status (..)
48 , Status (..)
52 , status200
49 , status200
50+ , status201
53 , status301
51 , status301
54 , status302
52 , status302
55 , status303
53 , status303
@@ -156,6 +154,10 @@ instance Eq Status where
156status200 :: Status
154status200 :: Status
157status200 = Status 200 $ B8.pack "OK"
155status200 = Status 200 $ B8.pack "OK"
158
156
157+-- | Created
158+status201 :: Status
159+status201 = Status 200 $ B8.pack "Created"
160+
159-- | Moved Permanently
161-- | Moved Permanently
160status301 :: Status
162status301 :: Status
161status301 = Status 301 $ B8.pack "Moved Permanently"
163status301 = Status 301 $ B8.pack "Moved Permanently"
wai.cabal+1−1
@@ -1,5 +1,5 @@
1Name: wai
1Name: wai
2−Version: 0.3.0
2+Version: 0.3.1
3Synopsis: Web Application Interface.
3Synopsis: Web Application Interface.
4Description: Provides a common protocol for communication between web aplications and web servers.
4Description: Provides a common protocol for communication between web aplications and web servers.
5License: BSD3
5License: BSD3