|
|
|
@ -160,10 +160,10 @@ void OnFinish(void* arg, grpc_error_handle error) { |
|
|
|
|
const char* expect = |
|
|
|
|
"<html><head><title>Hello world!</title></head>" |
|
|
|
|
"<body><p>This is a test</p></body></html>"; |
|
|
|
|
GPR_ASSERT(error.ok()); |
|
|
|
|
grpc_http_response response = request_state->response; |
|
|
|
|
gpr_log(GPR_INFO, "response status=%d error=%s", response.status, |
|
|
|
|
grpc_core::StatusToString(error).c_str()); |
|
|
|
|
GPR_ASSERT(error.ok()); |
|
|
|
|
GPR_ASSERT(response.status == 200); |
|
|
|
|
GPR_ASSERT(response.body_length == strlen(expect)); |
|
|
|
|
GPR_ASSERT(0 == memcmp(expect, response.body, response.body_length)); |
|
|
|
|