MCPcopy Create free account
hub / github.com/chen3feng/toft / GetMethodByName

Method GetMethodByName

net/http/request.cpp:40–50  ·  view source on GitHub ↗

static

Source from the content-addressed store, hash-verified

38
39// static
40HttpRequest::MethodType HttpRequest::GetMethodByName(StringPiece method_name) {
41 int i = 0;
42 while (kValidMethodNames[i].method_name != NULL) {
43 // Method is case sensitive.
44 if (method_name == kValidMethodNames[i].method_name) {
45 return kValidMethodNames[i].method;
46 }
47 ++i;
48 }
49 return HttpRequest::METHOD_UNKNOWN;
50}
51
52// static
53const char* HttpRequest::GetMethodName(MethodType method) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected