Skip to content

http/rs/resource-http-controller

Overview

Classes

HttpController

listen()

Alias for execute.

ts
listen(request: any, response: any): void;
ParameterTypeDescription
requestany
responseany

Returns

  • Type: void
  • Description:

execute()

Executes the request handling logic, finding the best matching resource and handler.

ts
execute(request: any, response: any): void;
ParameterTypeDescription
requestany
responseany

Returns

  • Type: void
  • Description:

mappings()

Returns the ResourceMappings instance of this controller.

ts
mappings(): ResourceMappings;

Returns

  • Type: ResourceMappings
  • Description:

sendError()

Sends an error response to the client, formatted based on the accepted media type.

ts
sendError(httpErrorCode: number, applicationErrorCode: any, errorName: string, errorDetails: string): void;
ParameterTypeDescription
httpErrorCodenumber
applicationErrorCodeany
errorNamestring
errorDetailsstring

Returns

  • Type: void
  • Description:

closeResponse()

Flushes and closes the HTTP response stream.

ts
closeResponse(): void;

Returns

  • Type: void
  • Description: