| 1180 | Result HttpResponse::sendJson(int code, StringSpan body) { return sendBody(code, body, "application/json"); } |
| 1181 | |
| 1182 | Result HttpResponse::sendEmpty(int code) |
| 1183 | { |
| 1184 | SC_TRY(startResponse(code)); |
| 1185 | SC_TRY(addContentLength(0)); |
| 1186 | SC_TRY(sendHeaders()); |
| 1187 | return end(); |
| 1188 | } |
| 1189 | |
| 1190 | Result HttpResponse::sendMethodNotAllowed(StringSpan allow) |
| 1191 | { |