egg
Version:
A web application framework for Node.js
27 lines • 953 B
TypeScript
import { Response as Response$1 } from "@eggjs/core";
//#region src/app/extend/response.d.ts
export default class Response extends Response$1 {
/**
* Get or set a real status code.
*
* e.g.: Using 302 status redirect to the global error page
* instead of show current 500 status page.
* And access log should save 500 not 302,
* then the `realStatus` can help us find out the real status code.
* @member {Number} Response#realStatus
* @return {Number} The status code to be set.
*/
get realStatus(): number;
/**
* Set a real status code.
*
* e.g.: Using 302 status redirect to the global error page
* instead of show current 500 status page.
* And access log should save 500 not 302,
* then the `realStatus` can help us find out the real status code.
* @member {Number} Response#realStatus
* @param {Number} status The status code to be set.
*/
set realStatus(status: number);
}
//#endregion