Beispiel #1
0
  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);
  }
Beispiel #2
0
  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);
  }