Permalink
Browse files

Merge pull request #227 from iamFIREcracker/patch-1

Support '204 No Content' status code
  • Loading branch information...
2 parents 2010d39 + 32c891c commit 6b86a402f243b65748d1c76d9b910b90125a9e4c @anandology anandology committed May 29, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 web/webapi.py
View
7 web/webapi.py
@@ -11,9 +11,9 @@
"ctx",
"HTTPError",
- # 200, 201, 202
- "OK", "Created", "Accepted",
- "ok", "created", "accepted",
+ # 200, 201, 202, 204
+ "OK", "Created", "Accepted", "NoContent",
+ "ok", "created", "accepted", "nocontent",
# 301, 302, 303, 304, 307
"Redirect", "Found", "SeeOther", "NotModified", "TempRedirect",
@@ -65,6 +65,7 @@ def __init__(self, data=data, headers={}):
ok = OK = _status_code("200 OK", data="")
created = Created = _status_code("201 Created")
accepted = Accepted = _status_code("202 Accepted")
+nocontent = NoContent = _status_code("204 No Content")
class Redirect(HTTPError):
"""A `301 Moved Permanently` redirect."""

0 comments on commit 6b86a40

Please sign in to comment.