MCPcopy Create free account
hub / github.com/boostorg/beast / doExpect100Continue

Method doExpect100Continue

test/doc/http_examples.cpp:76–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74 }
75
76 void
77 doExpect100Continue()
78 {
79 test::stream ts{ioc_}, tr{ioc_};
80 ts.connect(tr);
81 yield_to(
82 [&](yield_context)
83 {
84 error_code ec;
85 flat_buffer buffer;
86 receive_expect_100_continue(
87 tr, buffer, ec);
88 BEAST_EXPECTS(! ec, ec.message());
89 },
90 [&](yield_context)
91 {
92 flat_buffer buffer;
93 request<string_body> req;
94 req.version(11);
95 req.method_string("POST");
96 req.target("/");
97 req.insert(field::user_agent, "test");
98 req.body() = "Hello, world!";
99 req.prepare_payload();
100
101 error_code ec;
102 send_expect_100_continue(
103 ts, buffer, req, ec);
104 BEAST_EXPECTS(! ec, ec.message());
105 });
106 }
107
108 void
109 doCgiResponse()

Callers

nothing calls this directly

Calls 7

send_expect_100_continueFunction · 0.85
messageMethod · 0.80
targetMethod · 0.80
bodyMethod · 0.80
versionMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected