2020-03-24 23:13:01 +00:00
|
|
|
export interface ISimpleRequest {
|
|
|
|
headers: {};
|
|
|
|
parsedUrl: {
|
|
|
|
hash: string;
|
|
|
|
host: string;
|
|
|
|
hostname: string;
|
|
|
|
href: string;
|
|
|
|
readonly origin: string;
|
|
|
|
password: string;
|
|
|
|
pathname: string;
|
|
|
|
port: string;
|
|
|
|
protocol: string;
|
|
|
|
search: string;
|
2020-03-25 11:40:10 +00:00
|
|
|
readonly searchParams: any;
|
2020-03-24 23:13:01 +00:00
|
|
|
username: string;
|
|
|
|
toString: () => string;
|
2020-07-23 05:36:55 +00:00
|
|
|
toJSON: () => string;
|
2020-03-24 23:13:01 +00:00
|
|
|
};
|
2020-08-04 09:38:49 +00:00
|
|
|
body?: string | object | Buffer;
|
2020-03-24 23:13:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface ISimpleResponse {
|
|
|
|
headers: { [key: string]: string };
|
|
|
|
body: string;
|
|
|
|
}
|
|
|
|
export type IRenderFunction = (req: ISimpleRequest) => Promise<ISimpleResponse>;
|