| 541 | } |
| 542 | |
| 543 | std::pair<bool, std::string> HTTPRequest::GetHeader(const std::string& hdr) |
| 544 | { |
| 545 | const struct evkeyvalq* headers = evhttp_request_get_input_headers(req); |
| 546 | assert(headers); |
| 547 | const char* val = evhttp_find_header(headers, hdr.c_str()); |
| 548 | if (val) |
| 549 | return std::make_pair(true, val); |
| 550 | else |
| 551 | return std::make_pair(false, ""); |
| 552 | } |
| 553 | |
| 554 | std::string HTTPRequest::ReadBody() |
| 555 | { |