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

Method sendNamedStream

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

Source from the content-addressed store, hash-verified

93}
94
95bool HttpResponse::sendNamedStream(IDataSourceStream* newDataStream)
96{
97 String contentType;
98 if(newDataStream != nullptr && !headers.contains(HTTP_HEADER_CONTENT_TYPE)) {
99 contentType = ContentType::fromFullFileName(newDataStream->getName());
100 }
101
102 return sendDataStream(newDataStream, contentType);
103}
104
105bool HttpResponse::sendDataStream(IDataSourceStream* newDataStream, const String& reqContentType)
106{

Callers 8

onIndexFunction · 0.80
onIndexFunction · 0.80
onConfigurationFunction · 0.80
onApiDocFunction · 0.80
onIpConfigFunction · 0.80
onIndexFunction · 0.80
onIndexFunction · 0.80
onIndexFunction · 0.80

Calls 3

fromFullFileNameFunction · 0.50
containsMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected