import { ApiController , Controller , HttpGet , HttpPost , HttpResponseException , HttpStatusCode , HttpResponseMessage } from '../../../../index' ; @ Controller ( '/home' ) export class HomeController extends ApiController { @ HttpGet ( '/name' ) @ HttpPost ( '/name' ) getName ( ) { return 'HomeController' ; } @ HttpGet ( '/get' ) get ( ) { return { data : 'testing' , role : 'admin' } ; } @ HttpGet ( '/httpException' ) httpException ( ) { throw new HttpResponseException < string > ( HttpStatusCode . internalServerError , 'TestContent' ) ; } @ HttpGet ( '/httpResponse' ) httpResponse ( ) { return new HttpResponseMessage < string > ( HttpStatusCode . oK , 'TestData' ) ; } }