| 1149 | } |
| 1150 | |
| 1151 | Result 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 | |
| 1162 | Result HttpResponse::sendBytes(int code, Span<const char> body, StringSpan contentType) |
| 1163 | { |