private bool funcServ()
        {
            WebRoute route = Router.WebRoutes.Find(request.HttpMethod, request.RawUrl);

            if (route != null)
            {
                try
                {
                    route.webFunc(request, response);
                } catch (Exception e)
                {
                    Debug.LogError(e);
                    response.StatusCode = (int)HttpStatusCode.InternalServerError;
                }
                return(true);
            }
            return(false);
        }
Beispiel #2
0
 public void Add(WebRoute route)
 {
     webRoutesList.Add(route);
     Debug.Log("Added " + route.path + " as web route");
 }