* writeContinue - Handles sending a HTTP/1.1 100 Continue message to the * client, indicating that the request body should be sent. * @param {object} req - http request object * @param {object} res - http response object * @param {string} apiMethod - The API method to call * @return {undefined}
(req, res)
| 7 | * @return {undefined} |
| 8 | */ |
| 9 | function writeContinue(req, res) { |
| 10 | const { headers } = req; |
| 11 | // The Expect field-value is case-insensitive. Thus, just check for the |
| 12 | // Expect header's presence and a valid field-value. |
| 13 | if (headers.expect && headers.expect.toLowerCase() === '100-continue') { |
| 14 | res.writeContinue(); |
| 15 | } |
| 16 | return undefined; |
| 17 | } |
| 18 | |
| 19 | module.exports = writeContinue; |
no outgoing calls
no test coverage detected