Added sendStatus() to express.Response

Added as described in documentation: http://expressjs.com/4x/api.html#res.sendStatus
This commit is contained in:
Pekka Leppänen 2014-09-16 14:49:38 +03:00
parent 137096032e
commit e614990852

17
express/express.d.ts vendored
View File

@ -424,7 +424,22 @@ declare module "express" {
* @param code
*/
status(code: number): Response;
/**
* Set the response HTTP status code to `statusCode` and send its string representation as the response body.
* @link http://expressjs.com/4x/api.html#res.sendStatus
*
* Examples:
*
* res.sendStatus(200); // equivalent to res.status(200).send('OK')
* res.sendStatus(403); // equivalent to res.status(403).send('Forbidden')
* res.sendStatus(404); // equivalent to res.status(404).send('Not Found')
* res.sendStatus(500); // equivalent to res.status(500).send('Internal Server Error')
*
* @param code
*/
sendStatus(code: number): Send;
/**
* Set Link header field with the given `links`.
*