示例#1
0
文件: Router.java 项目: NorthFury/srs
  public Response handleRequest(Request request, RequestBody requestBody) {
    for (Route route : routes) {
      Response response = route.handle(request);
      if (!response.equals(Response.CONTINUE)) {
        return response;
      }
    }

    return defaultHandler.handle(request);
  }
示例#2
0
文件: Router.java 项目: NorthFury/srs
  public Response handleRequest(Request request) {
    for (Route route : routes) {
      Response response = route.handle(request);
      if (response.equals(Response.BODY_REQUIRED) || !response.equals(Response.CONTINUE)) {
        return response;
      }
    }

    return defaultHandler.handle(request);
  }