Ejemplo n.º 1
0
        public HttpHandlerSetting When(Func<RequestSetting, IRequestMatcher> requestMatcherExpression)
        {
            var handler = new HttpHandler();
            handler.RequestMatcher = requestMatcherExpression(new RequestSetting());
            _handlers.Add(handler);

            return this;
        }
Ejemplo n.º 2
0
 public HttpServer()
 {
     _pageNotFoundHandler = new HttpHandler { ResponseSetting = new ResponseSetting().Status(404) };
     _handlers = new List<HttpHandler>();
 }