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

Method setBody

Sming/Components/Network/src/Network/Http/HttpRequest.cpp:27–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27HttpRequest* HttpRequest::setBody(const uint8_t* rawData, size_t length)
28{
29 auto memory = new MemoryDataStream();
30 auto written = memory->write(rawData, length);
31 if(written < length) {
32 debug_e("HttpRequest::setBody: Unable to store the complete body");
33 }
34
35 return setBody(memory);
36}
37
38HttpRequest* HttpRequest::setBody(String&& body) noexcept
39{

Callers 6

connectOkFunction · 0.45
notifyMethod · 0.45
onConnectedFunction · 0.45
sendMethod · 0.45
sendRequestMethod · 0.45
bodyToStringParserFunction · 0.45

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected