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