mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Added sendStatus() to express.Response
Added as described in documentation: http://expressjs.com/4x/api.html#res.sendStatus
This commit is contained in:
Vendored
+16
-1
@@ -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`.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user