MCPcopy Create free account
hub / github.com/FastLED/FastLED / to_string

Method to_string

src/fl/stl/asio/http/server.cpp.hpp:226–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226string Response::to_string() const {
227 string result;
228
229 // Status line
230 result += "HTTP/1.0 ";
231 result += fl::to_string(mStatusCode);
232 result += " ";
233 result += status_text(mStatusCode);
234 result += "\r\n";
235
236 // Headers
237 for (auto it = mHeaders.begin(); it != mHeaders.end(); ++it) {
238 result += it->first + ": " + it->second + "\r\n";
239 }
240
241 // Content-Length (auto-calculated)
242 result += "Content-Length: " + fl::to_string(mBody.size()) + "\r\n";
243
244 // End of headers
245 result += "\r\n";
246
247 // Body
248 result += mBody;
249
250 return result;
251}
252
253//==============================================================================
254// HttpServer implementation

Callers 2

server.cpp.hppFile · 0.45
send_responseMethod · 0.45

Calls 5

status_textFunction · 0.85
to_stringFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected