bool TestExtCurl::test_evhttp_set_cache() { f_evhttp_set_cache("localhost", 4, s_server_port); for (int i = 0; i < 10; i++) { Variant ret = f_evhttp_get(String(get_request_uri()), make_packed_array("ECHO: foo")); VS(ret[s_code], 200); VS(ret[s_response], "OK"); VS(ret[s_headers][0], "ECHOED: foo"); VS(ret[s_headers][4], "Content-Length: 2"); } return Count(true); }
bool TestExtCurl::test_evhttp_set_cache() { f_evhttp_set_cache("localhost", 4, s_server_port); for (int i = 0; i < 10; i++) { Variant ret = f_evhttp_get(String(get_request_uri()), CREATE_VECTOR1("ECHO: foo")); VS(ret["code"], 200); VS(ret["response"], "OK"); VS(ret["headers"][0], "ECHOED: foo"); VS(ret["headers"][4], "Content-Length: 2"); } return Count(true); }