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