Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Router

Hierarchy

  • Router

Index

Constructors

constructor

Properties

Private deleteRouteRecognizer

deleteRouteRecognizer: RouteRecognizer

Private getRouteRecognizer

getRouteRecognizer: RouteRecognizer

Private handlers

handlers: IAddHandler

Private patchRouteRecognizer

patchRouteRecognizer: RouteRecognizer

Private postRouteRecognizer

postRouteRecognizer: RouteRecognizer

Private putRouteRecognizer

putRouteRecognizer: RouteRecognizer

Methods

delete

get

patch

post

put

Private registerHandler

  • registerHandler(routeRecognizer: RouteRecognizer, method: string, url: string, handler: IRouterHandler): void
  • TODO: This method could use some refactoring. There is conflict of interest between keeping clean separation of test and handle method Test method only returns boolean indicating if request can be handled, and handle method has opportunity to modify response and return promise of it. In the case of the router with route-recognizer where handlers are associated with routes, this already guarantees that only one handler is selected and makes the test method feel complicated Will leave as is an investigate cleaner ways at later time.

    Parameters

    • routeRecognizer: RouteRecognizer
    • method: string
    • url: string
    • handler: IRouterHandler

    Returns void

Generated using TypeDoc