| 747 | } |
| 748 | |
| 749 | HTTPRequest::RequestMethod HTTPRequest::GetRequestMethod() const { |
| 750 | switch (evhttp_request_get_command(req)) { |
| 751 | case EVHTTP_REQ_GET: |
| 752 | return GET; |
| 753 | case EVHTTP_REQ_POST: |
| 754 | return POST; |
| 755 | case EVHTTP_REQ_HEAD: |
| 756 | return HEAD; |
| 757 | case EVHTTP_REQ_PUT: |
| 758 | return PUT; |
| 759 | case EVHTTP_REQ_OPTIONS: |
| 760 | return OPTIONS; |
| 761 | default: |
| 762 | return UNKNOWN; |
| 763 | } |
| 764 | } |
| 765 | |
| 766 | void RegisterHTTPHandler(const std::string &prefix, bool exactMatch, |
| 767 | const HTTPRequestHandler &handler) { |
no outgoing calls