1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | import {IncomingMessage, ServerResponse} from 'http';
|
11 | import {HttpApplication} from "./app";
|
12 | import {HttpConfiguration} from "./config";
|
13 | import {DefaultDataContext} from '@themost/data/data-context';
|
14 |
|
15 | export declare class HttpContext extends DefaultDataContext {
|
16 |
|
17 | constructor(httpRequest : IncomingMessage, httpResponse : ServerResponse);
|
18 | getApplication(): HttpApplication;
|
19 | getConfiguration(): HttpConfiguration;
|
20 | getParam(name : any): any;
|
21 | hasParam(name : any): boolean;
|
22 | init(): void;
|
23 | cookie(name : string, value : any, expires? : Date, domain? : string, cookiePath? : string): void;
|
24 | getCookie(name : string): any;
|
25 | moment(p : any): void;
|
26 | setCookie(name : string, value : any, expires? : Date, domain? : string, cpath? : string): void;
|
27 | setLangCookie(lang : any): void;
|
28 | removeCookie(name : string, domain? : string, cpath? : string): string;
|
29 | unattended(fn : Function, callback : Function): void;
|
30 | culture(value? : string): HttpContext;
|
31 | validateAntiForgeryToken(csrfToken? : string): void;
|
32 | writeFile(file : string): void;
|
33 | is(method : string | Array<any>): boolean;
|
34 | isPost(): boolean;
|
35 | handle(method : string | Array<any>, fn : Function):HttpContext;
|
36 | catch(callback : (() => void) | Function): HttpContext;
|
37 | unhandle(fn : Function): HttpContext;
|
38 | handlePost(fn : Function): HttpContext;
|
39 | handleGet(fn : Function): HttpContext;
|
40 | handlePut(fn : Function): HttpContext;
|
41 | handleDelete(fn : Function): HttpContext;
|
42 | currentHandler(value? : any): HttpContext;
|
43 | translate(...text : string[]): string;
|
44 | engine(extension : string): void;
|
45 | request : IncomingMessage;
|
46 | response: ServerResponse;
|
47 | resolveUrl(appRelativeUrl: string): string;
|
48 | }
|
49 |
|