/* eslint-disable @typescript-eslint/ban-types */ import { AbstractHttpAdapter } from '@nestjs/core'; import { NoHttpException } from './exceptions'; // Just do nothing // eslint-disable-next-line @typescript-eslint/no-empty-function const noop = (): void => {}; export class NoopHttpAdapter extends AbstractHttpAdapter { override get(): void { throw new NoHttpException(); } override getHeader(): any { throw new NoHttpException(); } override appendHeader(): any { throw new NoHttpException(); } override post(): void { throw new NoHttpException(); } override put(): void { throw new NoHttpException(); } override patch(): void { throw new NoHttpException(); } override head(): void { throw new NoHttpException(); } override delete(): void { throw new NoHttpException(); } override all(): void { throw new NoHttpException(); } override use(): void { throw new NoHttpException(); } close(): any { noop(); } initHttpServer(): any { noop(); } useStaticAssets(): any { noop(); } setViewEngine(): any { noop(); } getRequestHostname(): any { noop(); } getRequestMethod(): any { noop(); } getRequestUrl(): any { noop(); } status(): any { noop(); } reply(): any { noop(); } end(): any { noop(); } render(): any { noop(); } redirect(): any { noop(); } setErrorHandler(): any { noop(); } setNotFoundHandler(): any { noop(); } isHeadersSent(): any { noop(); } setHeader(): any { noop(); } registerParserMiddleware(): any { noop(); } enableCors(): any { noop(); } createMiddlewareFactory(): (path: string, callback: Function) => any { return noop; } getType(): string { return 'noop'; } applyVersionFilter(): (req: any, res: any, next: () => void) => Function { return () => noop; } }