|
|
@ -47,7 +47,8 @@ static void on_finish(void* arg, grpc_error* error) { |
|
|
|
"<body><p>This is a test</p></body></html>"; |
|
|
|
"<body><p>This is a test</p></body></html>"; |
|
|
|
grpc_http_response* response = static_cast<grpc_http_response*>(arg); |
|
|
|
grpc_http_response* response = static_cast<grpc_http_response*>(arg); |
|
|
|
GPR_ASSERT(response); |
|
|
|
GPR_ASSERT(response); |
|
|
|
gpr_log(GPR_INFO, "response status %d", response->status); |
|
|
|
gpr_log(GPR_INFO, "response status=%d error=%s", response->status, |
|
|
|
|
|
|
|
grpc_error_string(error)); |
|
|
|
GPR_ASSERT(response->status == 200); |
|
|
|
GPR_ASSERT(response->status == 200); |
|
|
|
GPR_ASSERT(response->body_length == strlen(expect)); |
|
|
|
GPR_ASSERT(response->body_length == strlen(expect)); |
|
|
|
GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length)); |
|
|
|
GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length)); |
|
|
|