Class AbstractHttpAdapter<TServer, TRequest, TResponse>
Type parameters
-
TServer = any
-
TRequest = any
-
TResponse = any
Implements
- HttpServer<TRequest, TResponse>
Properties
Protected httpServer
httpServer: TServer
Protected Readonly instance
instance: any
Methods
Abstract createMiddlewareFactory
- createMiddlewareFactory(requestMethod: RequestMethod): ((path: string, callback: Function) => any) | Promise<(path: string, callback: Function) => any>
-
Parameters
Returns ((path: string, callback: Function) => any) | Promise<(path: string, callback: Function) => any>
delete
-
Parameters
Returns any
-
Parameters
Returns any
Abstract enableCors
- enableCors(options: CorsOptions, prefix?: string): any
-
Parameters
-
options: CorsOptions
-
Optional prefix: string
Returns any
get
-
Parameters
Returns any
-
Parameters
Returns any
getInstance
-
Type parameters
Returns T
Abstract getRequestHostname
- getRequestHostname(request: any): any
Abstract getRequestMethod
- getRequestMethod(request: any): any
Abstract getRequestUrl
- getRequestUrl(request: any): any
head
-
Parameters
Returns any
-
Parameters
Returns any
Abstract initHttpServer
- initHttpServer(options: NestApplicationOptions): any
-
Parameters
-
options: NestApplicationOptions
Returns any
listen
- listen(port: string | number, callback?: () => void): any
- listen(port: string | number, hostname: string, callback?: () => void): any
-
Parameters
-
port: string | number
-
Optional callback: () => void
Returns any
-
Parameters
-
port: string | number
-
hostname: string
-
Optional callback: () => void
Returns any
options
-
Parameters
Returns any
-
Parameters
Returns any
patch
-
Parameters
Returns any
-
Parameters
Returns any
post
-
Parameters
Returns any
-
Parameters
Returns any
put
-
Parameters
Returns any
-
Parameters
Returns any
Abstract redirect
- redirect(response: any, statusCode: number, url: string): any
-
Parameters
-
response: any
-
statusCode: number
-
url: string
Returns any
Abstract registerParserMiddleware
- registerParserMiddleware(prefix?: string): any
Abstract render
- render(response: any, view: string, options: any): any
-
Parameters
-
response: any
-
view: string
-
options: any
Returns any
Abstract reply
- reply(response: any, body: any, statusCode?: number): any
-
Parameters
-
response: any
-
body: any
-
Optional statusCode: number
Returns any
Abstract setErrorHandler
- setErrorHandler(handler: Function, prefix?: string): any
Abstract setHeader
- setHeader(response: any, name: string, value: string): any
-
Parameters
-
response: any
-
name: string
-
value: string
Returns any
setHttpServer
- setHttpServer(httpServer: TServer): void
Abstract setNotFoundHandler
- setNotFoundHandler(handler: Function, prefix?: string): any
Abstract setViewEngine
- setViewEngine(engine: string): any
Abstract status
- status(response: any, statusCode: number): any
-
Parameters
-
response: any
-
statusCode: number
Returns any
Abstract useStaticAssets
- useStaticAssets(...args: any[]): any