class Request { private static _instance: Request; private _baseUrl!: String; private _fresh!: Boolean; private _stale!: Boolean; private _ip!: String; private _method!: String; private _protocol!: String; private _host!: String; private _hostname!: String; private _originalUrl!: String; private _path!: String; private _secure!: Boolean; private _xhr!: Boolean; private _query!: any; private _params!: any; private _auth!: any; private _body!: any; public static getInstance(): Request { if (!this._instance) { this._instance = new Request(); } return this._instance; } get body() { //Contains key-value pairs of data submitted in the request body return this._body; } get cookies() { //When using cookie-parser middleware, this property is an object that contains cookies sent by the request. return ""; } get signedCookies() { //When using cookie-parser middleware, this property contains signed cookies sent by the request, unsigned and ready for use return ""; } get fresh() { //When the response is still “fresh” in the client’s cache true is returned, otherwise false is returned to indicate that the client cache is now stale and the full response should be sent. return this._fresh; } get stale() { //Indicates whether the request is “stale,” and is the opposite of req.fresh. return this._stale; } get ip() { //Contains the remote IP address of the request. return this._ip; } get method() { //Contains a string corresponding to the HTTP method of the request: GET, POST, PUT, and so on. return this._method; } get protocol() { //Contains the request protocol string: either http or (for TLS requests) https. return this._protocol; } get host() { //Contains the host derived from the Host HTTP header. return this._host; } get hostname() { //Contains the hostname derived from the Host HTTP header. return this._hostname; } get originalUrl() { //This property is much like req.url; however, it retains the original request URL return this._originalUrl; } get baseUrl() { //The URL path on which a router instance was mounted return this._baseUrl; } get path() { //Contains the path part of the request URL. return this._path; } get params() { //This property is an object containing properties mapped to the named route “parameters” return this._params; } get query() { //This property is an object containing a property for each query string parameter in the route return this._query; } get secure() { //A Boolean property that is true if a TLS connection is established return this._secure; } get xhr() { //A Boolean property that is true if the request’s X-Requested-With header field is “XMLHttpRequest”, indicating that the request was issued by a client library such as jQuery. return this._xhr; } get auth() { //Contains the username and password portion of the URL return this._auth; } async generateAuthentication(payload: any): Promise<[string, string]> { return new Promise((resolve, reject) => { resolve(["", ""]); }); } accepts(types: String | Array) {} get(field: String) {} is(type: String) {} } export default Request;