MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / startBody

Method startBody

Libraries/Http/HttpConnection.cpp:1151–1160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1149}
1150
1151Result HttpResponse::startBody(int code, uint64_t contentLength, StringSpan contentType)
1152{
1153 SC_TRY(startResponse(code));
1154 if (not contentType.isEmpty())
1155 {
1156 SC_TRY(addHeader("Content-Type", contentType));
1157 }
1158 SC_TRY(addContentLength(contentLength));
1159 return Result(true);
1160}
1161
1162Result HttpResponse::sendBytes(int code, Span<const char> body, StringSpan contentType)
1163{

Callers 2

responseBodyHelpersMethod · 0.80
sendBodyCopyMethod · 0.80

Calls 2

ResultClass · 0.50
isEmptyMethod · 0.45

Tested by 1

responseBodyHelpersMethod · 0.64