class HttpRequest { private url: string; private rawUri: string; private hostname: string; private port: number; private scheme: string; private method: string; private headers: any; private params: any; private body: any; constructor( rawUri: string, hostname: string, port: number, scheme: string, method: string, headers: any, params: any, body: any ) { this.rawUri = rawUri; this.hostname = hostname; this.port = port; this.scheme = scheme; this.url = scheme + "://" + hostname + ":" + port + rawUri; this.method = method; this.headers = headers; this.params = params; this.body = body ? JSON.stringify(body) : null; } public getUrl(): string { return this.url; } public getRawUri(): string { return this.rawUri; } public setRawUri(rawUri: string): void { this.rawUri = rawUri; } public getHostName(): string { return this.hostname; } public setHostName(hostname: string): void { this.hostname = hostname; } public getPort(): number { return this.port; } public setPort(port: number): void { this.port = port; } public setScheme(scheme: string): void { this.scheme = scheme; } public getScheme(): string { return this.scheme; } public getMethod(): string { return this.method; } public getHeaders(): any { return this.headers; } public getParams(): any { return this.params; } public setParams(params: any): void { this.params = params; } public getBody(): any { return this.body; } public setUrl(url: string): void { this.url = url; } public setMethod(method: string): void { this.method = method; } public setHeaders(headers: any): void { this.headers = headers; } public setBody(body: any): void { this.body = body; } } export default HttpRequest;