HTTP request method as string - use for logging only */
| 113 | |
| 114 | /** HTTP request method as string - use for logging only */ |
| 115 | std::string_view RequestMethodString(HTTPRequestMethod m) |
| 116 | { |
| 117 | switch (m) { |
| 118 | using enum HTTPRequestMethod; |
| 119 | case GET: return "GET"; |
| 120 | case POST: return "POST"; |
| 121 | case HEAD: return "HEAD"; |
| 122 | case PUT: return "PUT"; |
| 123 | case UNKNOWN: return "unknown"; |
| 124 | } // no default case, so the compiler can warn about missing cases |
| 125 | assert(false); |
| 126 | } |
| 127 | |
| 128 | static void MaybeDispatchRequestToWorker(std::shared_ptr<HTTPRequest> hreq) |
| 129 | { |
no outgoing calls