| 651 | } |
| 652 | |
| 653 | std::pair<bool, std::string> |
| 654 | HTTPRequest::GetHeader(const std::string &hdr) const { |
| 655 | const struct evkeyvalq *headers = evhttp_request_get_input_headers(req); |
| 656 | assert(headers); |
| 657 | const char *val = evhttp_find_header(headers, hdr.c_str()); |
| 658 | if (val) { |
| 659 | return std::make_pair(true, val); |
| 660 | } else { |
| 661 | return std::make_pair(false, ""); |
| 662 | } |
| 663 | } |
| 664 | |
| 665 | std::string HTTPRequest::ReadBody() { |
| 666 | struct evbuffer *buf = evhttp_request_get_input_buffer(req); |
no outgoing calls