| 690 | |
| 691 | std::string HTTPRequest::GetURI() { return evhttp_request_get_uri(req); } |
| 692 | HTTPRequest::RequestMethod HTTPRequest::GetRequestMethod() |
| 693 | { |
| 694 | switch (evhttp_request_get_command(req)) |
| 695 | { |
| 696 | case EVHTTP_REQ_GET: |
| 697 | return GET; |
| 698 | break; |
| 699 | case EVHTTP_REQ_POST: |
| 700 | return POST; |
| 701 | break; |
| 702 | case EVHTTP_REQ_HEAD: |
| 703 | return HEAD; |
| 704 | break; |
| 705 | case EVHTTP_REQ_PUT: |
| 706 | return PUT; |
| 707 | break; |
| 708 | default: |
| 709 | return UNKNOWN; |
| 710 | break; |
| 711 | } |
| 712 | } |
| 713 | |
| 714 | void RegisterHTTPHandler(const std::string &prefix, bool exactMatch, const HTTPRequestHandler &handler) |
| 715 | { |
no outgoing calls
no test coverage detected