HTTP request method as string - use for logging only */
| 228 | |
| 229 | /** HTTP request method as string - use for logging only */ |
| 230 | static std::string RequestMethodString(HTTPRequest::RequestMethod m) |
| 231 | { |
| 232 | switch (m) { |
| 233 | case HTTPRequest::GET: |
| 234 | return "GET"; |
| 235 | break; |
| 236 | case HTTPRequest::POST: |
| 237 | return "POST"; |
| 238 | break; |
| 239 | case HTTPRequest::HEAD: |
| 240 | return "HEAD"; |
| 241 | break; |
| 242 | case HTTPRequest::PUT: |
| 243 | return "PUT"; |
| 244 | break; |
| 245 | default: |
| 246 | return "unknown"; |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | /** HTTP request callback */ |
| 251 | static void http_request_cb(struct evhttp_request* req, void* arg) |