| 582 | } |
| 583 | |
| 584 | HTTPRequest::RequestMethod HTTPRequest::GetRequestMethod() { |
| 585 | switch (evhttp_request_get_command(req)) { |
| 586 | case EVHTTP_REQ_GET: |
| 587 | return GET; |
| 588 | case EVHTTP_REQ_POST: |
| 589 | return POST; |
| 590 | case EVHTTP_REQ_HEAD: |
| 591 | return HEAD; |
| 592 | case EVHTTP_REQ_PUT: |
| 593 | return PUT; |
| 594 | case EVHTTP_REQ_OPTIONS: |
| 595 | return OPTIONS; |
| 596 | default: |
| 597 | return UNKNOWN; |
| 598 | } |
| 599 | } |
| 600 | |
| 601 | void RegisterHTTPHandler(const std::string &prefix, bool exactMatch, |
| 602 | const HTTPRequestHandler &handler) { |
no outgoing calls
no test coverage detected