mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-28 17:35:49 +08:00
Merge pull request #8680 from flowpl/add_flow_control_methods_to_hapi_Response_class
added flow control methods to Hapi Response class
This commit is contained in:
6
hapi/hapi.d.ts
vendored
6
hapi/hapi.d.ts
vendored
@@ -1451,6 +1451,9 @@ declare module "hapi" {
|
||||
override: boolean;
|
||||
}): Response;
|
||||
|
||||
/** hold() - puts the response on hold until response.send() is called. Available only after reply() is called and until response.hold() is invoked once. */
|
||||
hold():Response;
|
||||
|
||||
/** location(uri) - sets the HTTP 'Location' header where:
|
||||
uri - an absolute or relative URI used as the 'Location' header value.*/
|
||||
location(uri: string): Response;
|
||||
@@ -1472,6 +1475,9 @@ declare module "hapi" {
|
||||
options - optional configuration. If the state was previously registered with the server using server.state(), the specified keys in options override those same keys in the server definition (but not others).*/
|
||||
state(name: string, value: string, options?: any): Response;
|
||||
|
||||
/** send() - resume the response which will be transmitted in the next tick. Available only after response.hold() is called and until response.send() is invoked once. */
|
||||
send():void;
|
||||
|
||||
/** sets a string suffix when the response is process via JSON.stringify().*/
|
||||
suffix(suffix: string): void;
|
||||
/** overrides the default route cache expiration rule for this response instance where:
|
||||
|
||||
Reference in New Issue
Block a user