Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface HeaderDecorator

Type of Header decorator

Hierarchy

  • HeaderDecorator

Callable

  • __call(name: string, value: string): any
  • Defines a header

    example
    @Controller()
    export class TestController {
      @Get('/')
      @Header('ETag', 'foobar')
      index() {}
    
      @Get('/test')
      test() {
        return Result([ new Header('ETag', 'foobar') ]);
      }
    }
    

    Parameters

    • name: string
    • value: string

    Returns any

Index

Constructors

Constructors

constructor

  • new HeaderDecorator(name: string, value: string): Header

Generated using TypeDoc