MCPcopy Create free account
hub / github.com/boostorg/beast / method_to_string

Function method_to_string

test/bench/parser/nodejs_parser.hpp:82–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82inline
83char const*
84method_to_string(unsigned method)
85{
86 using namespace beast;
87 switch(static_cast<http_method>(method))
88 {
89 case HTTP_DELETE: return "DELETE";
90 case HTTP_GET: return "GET";
91 case HTTP_HEAD: return "HEAD";
92 case HTTP_POST: return "POST";
93 case HTTP_PUT: return "PUT";
94
95 // pathological
96 case HTTP_CONNECT: return "CONNECT";
97 case HTTP_OPTIONS: return "OPTIONS";
98 case HTTP_TRACE: return "TRACE";
99
100 // webdav
101 case HTTP_COPY: return "COPY";
102 case HTTP_LOCK: return "LOCK";
103 case HTTP_MKCOL: return "MKCOL";
104 case HTTP_MOVE: return "MOVE";
105 case HTTP_PROPFIND: return "PROPFIND";
106 case HTTP_PROPPATCH: return "PROPPATCH";
107 case HTTP_SEARCH: return "SEARCH";
108 case HTTP_UNLOCK: return "UNLOCK";
109 case HTTP_BIND: return "BIND";
110 case HTTP_REBIND: return "REBIND";
111 case HTTP_UNBIND: return "UNBIND";
112 case HTTP_ACL: return "ACL";
113
114 // subversion
115 case HTTP_REPORT: return "REPORT";
116 case HTTP_MKACTIVITY: return "MKACTIVITY";
117 case HTTP_CHECKOUT: return "CHECKOUT";
118 case HTTP_MERGE: return "MERGE";
119
120 // upnp
121 case HTTP_MSEARCH: return "MSEARCH";
122 case HTTP_NOTIFY: return "NOTIFY";
123 case HTTP_SUBSCRIBE: return "SUBSCRIBE";
124 case HTTP_UNSUBSCRIBE: return "UNSUBSCRIBE";
125
126 // RFC-5789
127 case HTTP_PATCH: return "PATCH";
128 case HTTP_PURGE: return "PURGE";
129
130 // CalDav
131 case HTTP_MKCALENDAR: return "MKCALENDAR";
132
133 // RFC-2068, section 19.6.1.2
134 case HTTP_LINK: return "LINK";
135 case HTTP_UNLINK: return "UNLINK";
136 };
137
138 return "<unknown>";
139}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected