MCPcopy Create free account
hub / github.com/apache/brpc / Expect

Method Expect

test/brpc_http_rpc_protocol_unittest.cpp:1892–1903  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1890 }
1891
1892 void Expect(::google::protobuf::RpcController* cntl_base,
1893 const ::test::HttpRequest*,
1894 ::test::HttpResponse*,
1895 ::google::protobuf::Closure* done) override {
1896 brpc::ClosureGuard done_guard(done);
1897 brpc::Controller* cntl = static_cast<brpc::Controller*>(cntl_base);
1898 const std::string* expect = cntl->http_request().GetHeader("Expect");
1899 ASSERT_TRUE(expect != NULL);
1900 ASSERT_EQ("100-continue", *expect);
1901 ASSERT_EQ(cntl->http_request().method(), brpc::HTTP_METHOD_POST);
1902 cntl->response_attachment().append("world");
1903 }
1904};
1905
1906TEST_F(HttpTest, http_head) {

Callers

nothing calls this directly

Calls 3

GetHeaderMethod · 0.80
methodMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected