HTTP request method as string - use for logging only */
| 117 | |
| 118 | /** HTTP request method as string - use for logging only */ |
| 119 | static std::string RequestMethodString(HTTPRequest::RequestMethod m) { |
| 120 | switch (m) { |
| 121 | case HTTPRequest::GET: |
| 122 | return "GET"; |
| 123 | case HTTPRequest::POST: |
| 124 | return "POST"; |
| 125 | case HTTPRequest::HEAD: |
| 126 | return "HEAD"; |
| 127 | case HTTPRequest::PUT: |
| 128 | return "PUT"; |
| 129 | case HTTPRequest::OPTIONS: |
| 130 | return "OPTIONS"; |
| 131 | default: |
| 132 | return "unknown"; |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | /** HTTP request callback */ |
| 137 | static void http_request_cb(struct evhttp_request *req, void *arg) { |