HTTP request method as string - use for logging only */
| 259 | |
| 260 | /** HTTP request method as string - use for logging only */ |
| 261 | std::string RequestMethodString(HTTPRequest::RequestMethod m) { |
| 262 | switch (m) { |
| 263 | case HTTPRequest::GET: |
| 264 | return "GET"; |
| 265 | case HTTPRequest::POST: |
| 266 | return "POST"; |
| 267 | case HTTPRequest::HEAD: |
| 268 | return "HEAD"; |
| 269 | case HTTPRequest::PUT: |
| 270 | return "PUT"; |
| 271 | case HTTPRequest::OPTIONS: |
| 272 | return "OPTIONS"; |
| 273 | default: |
| 274 | return "unknown"; |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | /** HTTP request callback */ |
| 279 | static void http_request_cb(struct evhttp_request *req, void *arg) { |
no outgoing calls