Skip to content

Instantly share code, notes, and snippets.

@techieshark
Created August 29, 2019 01:11
Show Gist options
  • Save techieshark/858463e4d2555e6160730a85049b1364 to your computer and use it in GitHub Desktop.
Save techieshark/858463e4d2555e6160730a85049b1364 to your computer and use it in GitHub Desktop.

Revisions

  1. techieshark created this gist Aug 29, 2019.
    6 changes: 6 additions & 0 deletions send204.ts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    import { NO_CONTENT } from 'http-status-codes';

    const send204 = (req: Request, res: Response, next: NextFunction) => {
    res.status(NO_CONTENT);
    res.end();
    };