MCPcopy Create free account
hub / github.com/bmorcelli/Launcher / sendText

Function sendText

src/webInterface.cpp:248–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248void sendText(httpd_req_t *req, int status, const char *type, const String &body) {
249 httpd_resp_set_status(
250 req,
251 status == 200 ? "200 OK"
252 : status == 400 ? "400 Bad Request"
253 : status == 401 ? "401 Unauthorized"
254 : status == 404 ? "404 Not Found"
255 : "500 Internal Server Error"
256 );
257 httpd_resp_set_type(req, type);
258 httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
259 httpd_resp_send(req, body.c_str(), body.length());
260}
261
262void sendText(httpd_req_t *req, const char *type, const String &body) { sendText(req, 200, type, body); }
263

Callers 15

checkUserWebAuthFunction · 0.85
streamMultipartUploadFunction · 0.85
pingHandlerFunction · 0.85
loggedOutHandlerFunction · 0.85
updateFromSdHandlerFunction · 0.85
renameHandlerFunction · 0.85
otaHandlerFunction · 0.85
systemInfoHandlerFunction · 0.85
rebootHandlerFunction · 0.85
listFilesHandlerFunction · 0.85
sendFileDownloadFunction · 0.85
fileHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected