| 605 | } |
| 606 | |
| 607 | std::pair<bool, std::string> HTTPRequest::GetHeader(const std::string& hdr) |
| 608 | { |
| 609 | const struct evkeyvalq* headers = evhttp_request_get_input_headers(req); |
| 610 | assert(headers); |
| 611 | const char* val = evhttp_find_header(headers, hdr.c_str()); |
| 612 | if (val) |
| 613 | return std::make_pair(true, val); |
| 614 | else |
| 615 | return std::make_pair(false, ""); |
| 616 | } |
| 617 | |
| 618 | std::string HTTPRequest::ReadBody() |
| 619 | { |