1
1
/* eslint-disable @typescript-eslint/ban-types */
2
2
/* eslint-disable @typescript-eslint/no-unused-vars */
3
3
/* eslint-disable @typescript-eslint/no-empty-function */
4
- import { HttpStatus , RequestMethod } from '@nestjs/common' ;
4
+ import {
5
+ HttpStatus ,
6
+ InternalServerErrorException ,
7
+ NotImplementedException ,
8
+ RequestMethod ,
9
+ VersioningOptions
10
+ } from '@nestjs/common' ;
11
+ import { VersionValue } from '@nestjs/common/interfaces' ;
5
12
import { CorsOptions } from '@nestjs/common/interfaces/external/cors-options.interface' ;
6
13
import { AbstractHttpAdapter } from '@nestjs/core' ;
7
14
import { RouterMethodFactory } from '@nestjs/core/helpers/router-method-factory' ;
@@ -62,6 +69,10 @@ export class AzureHttpRouter extends AbstractHttpAdapter {
62
69
response . statusCode = statusCode ;
63
70
}
64
71
72
+ public end ( response : any , message ?: string ) {
73
+ return response . end ( message ) ;
74
+ }
75
+
65
76
public getHttpServer < T = any > ( ) : T {
66
77
return this . instance as T ;
67
78
}
@@ -70,6 +81,10 @@ export class AzureHttpRouter extends AbstractHttpAdapter {
70
81
return this . instance as T ;
71
82
}
72
83
84
+ public isHeadersSent ( response : any ) : boolean {
85
+ return response . headersSent ;
86
+ }
87
+
73
88
public setHeader ( response : any , name : string , value : string ) {
74
89
return response . setHeader ( name , value ) ;
75
90
}
@@ -98,6 +113,17 @@ export class AzureHttpRouter extends AbstractHttpAdapter {
98
113
return 'azure-http' ;
99
114
}
100
115
116
+ public applyVersionFilter (
117
+ handler : Function ,
118
+ version : VersionValue ,
119
+ versioningOptions : VersioningOptions
120
+ ) {
121
+ throw new NotImplementedException ( ) ;
122
+ return ( req , res , next ) => {
123
+ return ( ) => { } ;
124
+ } ;
125
+ }
126
+
101
127
public listen ( port : any , ...args : any [ ] ) { }
102
128
public render ( response : any , view : string , options : any ) { }
103
129
public redirect ( response : any , statusCode : number , url : string ) { }
0 commit comments