UNPKG

@hapiness/ng-universal

Version:

This is a Hapiness Engine for running Angular Apps on the server for server side rendering.

41 lines (40 loc) 970 B
export declare class HttpServerReply { private _headers; private _redirectUrl; private _willRedirect; /** * Constructor */ constructor(); /** * Add new header to the original response * * @param {string} key the header's key * @param {string} value the header's value * * @returns {HttpServerReply} current instance */ header(key: string, value: string): HttpServerReply; /** * Returns all additional headers for current response */ readonly headers: { [key: string]: string; }; /** * Set redirect url * * @param {string} url redirection * * @returns {HttpServerReply} current instance */ redirect(url: string): HttpServerReply; /** * Returns redirect url value */ readonly redirectUrl: string; /** * Returns flag to know if response will be a redirection */ readonly willRedirect: boolean; }