@breautek/storm
Version:
Object-Oriented REST API framework
30 lines (29 loc) • 979 B
TypeScript
import * as express from 'express';
import { IncomingHttpHeaders } from 'http';
import { Writable } from 'stream';
import { IFormData } from './IFormData';
import { IAuthTokenData } from './IAuthTokenData';
export interface IParameterMap {
[key: string]: string;
}
export declare class Request<TBody = any, TAuthToken extends IAuthTokenData = IAuthTokenData> {
private $request;
constructor(request: express.Request);
getBody(): TBody;
getForm(): Promise<IFormData>;
getHeaders(): IncomingHttpHeaders;
getHeader(name: string): string;
getQueryVariables(): any;
getParams(): IParameterMap;
getParam(name: string): string;
getIP(): string;
getForwardedIP(): string;
getHostname(): string;
getMethod(): string;
getURL(): string;
isSecure(): boolean;
pipe(destination: Writable): any;
unpipe(source: Writable): void;
getRequestSource(): express.Request;
getAuthenticationToken(): Promise<TAuthToken>;
}