]> git.tdb.fi Git - libs/net.git/blob - source/http/status.cpp
c5fdf96a854c1a40475b317ba095a52773362af1
[libs/net.git] / source / http / status.cpp
1 #include "status.h"
2
3 using namespace std;
4
5 namespace Msp {
6 namespace Http {
7
8 ostream &operator<<(ostream &out, Status status)
9 {
10         switch(status)
11         {
12         case NONE: out<<"None"; break;
13         case OK: out<<"OK"; break;
14         case BAD_REQUEST: out<<"Bad Request"; break;
15         case FORBIDDEN: out<<"Forbidden"; break;
16         case NOT_FOUND: out<<"Not Found"; break;
17         case METHOD_NOT_ALLOWED: out<<"Method not allowed"; break;
18         case INTERNAL_ERROR: out<<"Internal Error"; break;
19         case NOT_IMPLEMENTED: out<<"Not Implemented"; break;
20         default: out<<"Unknown Status"; break;
21         }
22
23         return out;
24 }
25
26 } // namespace Http
27 } // namespace Msp