mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +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:
parent
137096032e
commit
e614990852
17
express/express.d.ts
vendored
17
express/express.d.ts
vendored
@ -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`.
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user