| 620 | std::string HTTPRequest::GetURI() const { return evhttp_request_get_uri(req); } |
| 621 | |
| 622 | HTTPRequest::RequestMethod HTTPRequest::GetRequestMethod() const { |
| 623 | switch (evhttp_request_get_command(req)) { |
| 624 | case EVHTTP_REQ_GET: |
| 625 | return GET; |
| 626 | break; |
| 627 | case EVHTTP_REQ_POST: |
| 628 | return POST; |
| 629 | break; |
| 630 | case EVHTTP_REQ_HEAD: |
| 631 | return HEAD; |
| 632 | break; |
| 633 | case EVHTTP_REQ_PUT: |
| 634 | return PUT; |
| 635 | break; |
| 636 | default: |
| 637 | return UNKNOWN; |
| 638 | break; |
| 639 | } |
| 640 | } |
| 641 | |
| 642 | void RegisterHTTPHandler(const std::string& prefix, bool exactMatch, |
| 643 | const HTTPRequestHandler& handler) { |
no outgoing calls
no test coverage detected