MCPcopy
hub / github.com/axios/axios / sendResponse

Function sendResponse

examples/server.js:58–62  ·  view source on GitHub ↗
(res, statusCode, body)

Source from the content-addressed store, hash-verified

56}
57
58function sendResponse(res, statusCode, body) {
59 res.writeHead(statusCode);
60 res.write(body);
61 res.end();
62}
63
64function send200(res, body) {
65 sendResponse(res, 200, body || '<h1>OK</h1>');

Callers 2

send200Function · 0.85
send404Function · 0.85

Calls 2

writeMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected