MCPcopy Create free account
hub / github.com/SmingHub/Sming / sendString

Method sendString

Sming/Components/Network/src/Network/Http/HttpResponse.cpp:43–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43bool HttpResponse::sendString(const String& text)
44{
45 auto memoryStream = new MemoryDataStream();
46 if(memoryStream == nullptr) {
47 return false;
48 }
49
50 setStream(memoryStream);
51
52 return memoryStream->print(text) == text.length();
53}
54
55bool HttpResponse::sendString(String&& text) noexcept
56{

Callers 1

sendErrorMethod · 0.45

Calls 2

printMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected