HTTP request method as string - use for logging only */
| 190 | |
| 191 | /** HTTP request method as string - use for logging only */ |
| 192 | static std::string RequestMethodString(HTTPRequest::RequestMethod m) |
| 193 | { |
| 194 | switch (m) { |
| 195 | case HTTPRequest::GET: |
| 196 | return "GET"; |
| 197 | break; |
| 198 | case HTTPRequest::POST: |
| 199 | return "POST"; |
| 200 | break; |
| 201 | case HTTPRequest::HEAD: |
| 202 | return "HEAD"; |
| 203 | break; |
| 204 | case HTTPRequest::PUT: |
| 205 | return "PUT"; |
| 206 | break; |
| 207 | default: |
| 208 | return "unknown"; |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | /** HTTP request callback */ |
| 213 | static void http_request_cb(struct evhttp_request* req, void* arg) |