UNPKG

424 BJavaScriptView Raw
1'use strict'
2
3/**
4 * Sends a chunk of the response body and signals the server
5 * that all of the response headers and body have been sent.
6 * @param {Object} res - Object which was created internally by a HTTP server.
7 * @param {String} contentType - MIME-Type of the data.
8 * @param {String|Buffer} data
9 */
10module.exports = function(res, contentType, data) {
11
12 res.setHeader('Content-Type', contentType)
13 res.end(data)
14
15}
\No newline at end of file