@@ -7,13 +7,10 @@ This module defines a generic web application interface. It is a common
77protocol between web servers and web applications.
88
99The overriding design principles here are performance and generality . To
10−address performance, this library is built on 'Source' for the request body and
11−'Enumerator' for the response bodies. The advantages of this approach over lazy
12−IO have been debated elsewhere.
13−
14−Nonetheless, many people find these data structures difficult to work with. For
15−that reason, this library includes the "Network.Wai.Enumerator" module to
16−provide more familiar abstractions, including lazy IO.
10+address performance, this library is built on top of the enumerator package.
11+The advantages of this approach over lazy IO have been debated elsewhere.
12+However, helper functions like 'responseLBS' allow you to continue using lazy
13+IO if you so desire.
1714
1815Generality is achieved by removing many variables commonly found in similar
1916projects that are not universal to all servers. The goal is that the 'Request'
@@ -50,6 +47,7 @@ module Network.Wai
5047 -- ** Response status code
5148 , Status (..)
5249 , status200
50+ , status201
5351 , status301
5452 , status302
5553 , status303
@@ -156,6 +154,10 @@ instance Eq Status where
156154status200 :: Status
157155status200 = Status 200 $ B8.pack "OK"
158156
157+-- | Created
158+status201 :: Status
159+status201 = Status 200 $ B8.pack "Created"
160+
159161-- | Moved Permanently
160162status301 :: Status
161163status301 = Status 301 $ B8.pack "Moved Permanently"