On Sun, Dec 14, 2008 at 10:53 AM, Nick Retallack
<[email protected]> wrote:
>
> I know we can raise 404 notfound, but what about 401 unauthorized, or
> other error responses?  I noticed some discussion on this topic, but
> I'd like to know if it ever got implemented.  I know I can set this
> with web.ctx.status, but raising it as an exception is more convenient.

raise web.HTTPError("401 unauthorized", {}, "unauthorized")

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to