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

Method onData

Tests/Libraries/Http/HttpAsyncClientTest.cpp:1068–1076  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1066 responseSent = true;
1067 SC_ASSERT_RELEASE(connection->response.startResponse(200));
1068 SC_ASSERT_RELEASE(connection->response.addHeader("Content-Length", "6"));
1069 SC_ASSERT_RELEASE(connection->response.sendHeaders());
1070 SC_ASSERT_RELEASE(connection->response.getWritableStream().write("stored"));
1071 SC_ASSERT_RELEASE(connection->response.end());
1072 }
1073
1074 [[nodiscard]] StringSpan view() const { return {body.toSpanConst(), false, StringEncoding::Ascii}; }
1075 } serverCtx;
1076
1077 httpServer.onRequest = [this, &serverCtx](HttpConnection& connection)
1078 {
1079 serverCtx.connection = &connection;

Callers

nothing calls this directly

Calls 9

getReadableDataMethod · 0.80
consumeBodyBytesMethod · 0.80
startResponseMethod · 0.80
sendHeadersMethod · 0.80
appendFunction · 0.50
sizeInBytesMethod · 0.45
addHeaderMethod · 0.45
writeMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected