MCPcopy Create free account
hub / github.com/boostorg/asio / stock_reply

Method stock_reply

example/cpp11/http/server/reply.cpp:241–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239} // namespace stock_replies
240
241reply reply::stock_reply(reply::status_type status)
242{
243 reply rep;
244 rep.status = status;
245 rep.content = stock_replies::to_string(status);
246 rep.headers.resize(2);
247 rep.headers[0].name = "Content-Length";
248 rep.headers[0].value = std::to_string(rep.content.size());
249 rep.headers[1].name = "Content-Type";
250 rep.headers[1].value = "text/html";
251 return rep;
252}
253
254} // namespace server
255} // namespace http

Callers

nothing calls this directly

Calls 3

to_stringFunction · 0.70
resizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected