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