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

Method sendRedirect

Libraries/Http/HttpConnection.cpp:1198–1206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1196{
1197 SC_TRY(startBody(code, body.sizeInBytes(), contentType));
1198 SC_TRY(sendHeaders());
1199 if (body.sizeInBytes() > 0)
1200 {
1201 SC_TRY(getWritableStream().write(AsyncBufferView(body)));
1202 }
1203 return end();
1204}
1205
1206Result HttpResponse::sendBody(int code, StringSpan body, StringSpan contentType)
1207{
1208 return sendBytes(code, body.toCharSpan(), contentType);
1209}

Callers 2

responseBodyHelpersMethod · 0.80

Calls 2

endFunction · 0.85
isEmptyMethod · 0.45

Tested by 2

responseBodyHelpersMethod · 0.64