Created
August 29, 2019 01:11
-
-
Save techieshark/858463e4d2555e6160730a85049b1364 to your computer and use it in GitHub Desktop.
node: send204()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NO_CONTENT } from 'http-status-codes'; | |
const send204 = (req: Request, res: Response, next: NextFunction) => { | |
res.status(NO_CONTENT); | |
res.end(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment