MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / onData

Method onData

Tests/Libraries/Http/HttpAsyncServerTest.cpp:611–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

609 String endpoint = StringEncoding::Ascii;
610 SC_TEST_EXPECT(StringBuilder::format(endpoint, "http://127.0.0.1:{}/chunked", serverPort));
611 constexpr StringView request = "PUT /chunked HTTP/1.1\r\n"
612 "Host: 127.0.0.1\r\n"
613 "Transfer-Encoding: chunked\r\n"
614 "\r\n"
615 "5\r\nhello\r\n6\r\n world\r\n0\r\n\r\n";
616
617 client.callback = [this, &httpServer](HttpTestClient& clientRef)
618 {
619 StringView response(clientRef.getResponse());
620 SC_TEST_EXPECT(response.containsString("200 OK"));
621 SC_TEST_EXPECT(httpServer.stop());

Callers

nothing calls this directly

Calls 4

getReadableDataMethod · 0.80
consumeBodyBytesMethod · 0.80
appendFunction · 0.50
sizeInBytesMethod · 0.45

Tested by

no test coverage detected