Stone.js API
    Preparing search index...
    • Decorator to mark a class method as a file outgoing http response.

      Type Parameters

      • T extends Function = Function

      Parameters

      • statusCode: number = HTTP_OK

        The status code of the response.

      • headers: HeadersType = {}

        The headers for the response.

      Returns MethodDecorator

      A method decorator.

      import { FileHttpResponse } from '@stone-js/http-core';

      class UserController {
      @FileHttpResponse()
      getUsers() {
      return new File('path/to/file');
      }
      }