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

Method equal_body

test/beast/http/write.cpp:276–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274
275 template<bool isRequest>
276 bool
277 equal_body(string_view sv, string_view body)
278 {
279 test::stream ts{ioc_, sv}, tr{ioc_};
280 ts.connect(tr);
281 message<isRequest, string_body, fields> m;
282 multi_buffer b;
283 ts.close_remote();
284 try
285 {
286 read(ts, b, m);
287 return m.body() == body;
288 }
289 catch(std::exception const& e)
290 {
291 log << "equal_body: " << e.what() << std::endl;
292 return false;
293 }
294 }
295
296 template<bool isRequest, class Body, class Fields>
297 std::string

Callers

nothing calls this directly

Calls 3

bodyMethod · 0.80
whatMethod · 0.80
readFunction · 0.50

Tested by

no test coverage detected