예제 #1
0
 private boolean acceptsHttpGet(Method method) {
   if (method.isAnnotationPresent(Get.class)) {
     return true;
   }
   for (HttpMethod httpMethod : HttpMethod.values()) {
     if (method.isAnnotationPresent(httpMethod.getAnnotation())) {
       return false;
     }
   }
   return true;
 }
예제 #2
0
 private void tryMovePermanentlyTo(RequestInfo requestInfo, String newUri) {
   router.parse(newUri, HttpMethod.of(requestInfo.getRequest()), requestInfo.getRequest());
   result.permanentlyRedirectTo(newUri);
 }