Skip to content

Custom route handler

Tom Kuijsten edited this page Sep 30, 2016 · 2 revisions

The restup web server is setup in a modular fashion. You start by creating a HttpServerConfiguration and register multiple IRouteHandlers to add functionality to that server.

IRouteHandler

If you need a custom handler, just implement a IRouteHandler and register it during the configuration creation. The handler interface has only one method:

Task<HttpServerResponse> HandleRequest(IHttpServerRequest request);