@@ -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.
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.
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
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"
159+status201 = Status 200 $ B8.pack "Created"
159-- | Moved Permanently
161-- | Moved Permanently
160status301 :: Status
162status301 :: Status
161status301 = Status 301 $ B8.pack "Moved Permanently"
163status301 = Status 301 $ B8.pack "Moved Permanently"