| 480 | } |
| 481 | |
| 482 | std::pair<bool, std::string> HTTPRequest::GetHeader(const std::string &hdr) { |
| 483 | const struct evkeyvalq *headers = evhttp_request_get_input_headers(req); |
| 484 | assert(headers); |
| 485 | const char *val = evhttp_find_header(headers, hdr.c_str()); |
| 486 | if (val) |
| 487 | return std::make_pair(true, val); |
| 488 | else |
| 489 | return std::make_pair(false, ""); |
| 490 | } |
| 491 | |
| 492 | std::string HTTPRequest::ReadBody() { |
| 493 | struct evbuffer *buf = evhttp_request_get_input_buffer(req); |
no outgoing calls