HTTP request method as string - use for logging only */
| 209 | |
| 210 | /** HTTP request method as string - use for logging only */ |
| 211 | static std::string RequestMethodString(HTTPRequest::RequestMethod m) |
| 212 | { |
| 213 | switch (m) |
| 214 | { |
| 215 | case HTTPRequest::GET: |
| 216 | return "GET"; |
| 217 | break; |
| 218 | case HTTPRequest::POST: |
| 219 | return "POST"; |
| 220 | break; |
| 221 | case HTTPRequest::HEAD: |
| 222 | return "HEAD"; |
| 223 | break; |
| 224 | case HTTPRequest::PUT: |
| 225 | return "PUT"; |
| 226 | break; |
| 227 | default: |
| 228 | return "unknown"; |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | /** HTTP request callback */ |
| 233 | static void http_request_cb(struct evhttp_request *req, void *arg) |