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

Method sendBytes

Libraries/Http/HttpConnection.cpp:1162–1171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1160}
1161
1162Result HttpResponse::sendBytes(int code, Span<const char> body, StringSpan contentType)
1163{
1164 SC_TRY(startBody(code, body.sizeInBytes(), contentType));
1165 SC_TRY(sendHeaders());
1166 if (body.sizeInBytes() > 0)
1167 {
1168 SC_TRY(getWritableStream().write(AsyncBufferView(body)));
1169 }
1170 return end();
1171}
1172
1173Result HttpResponse::sendBody(int code, StringSpan body, StringSpan contentType)
1174{

Callers

nothing calls this directly

Calls 4

AsyncBufferViewFunction · 0.85
endFunction · 0.85
sizeInBytesMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected