Package br.com.caelum.vraptor.resource

Examples of br.com.caelum.vraptor.resource.HttpMethod


  }


  @Test
  public void passesTheWebMethod() throws SecurityException, NoSuchMethodException {
    HttpMethod delete = HttpMethod.DELETE;
    Route route = mock(Route.class);
   
    when(route.canHandle("/clients/add")).thenReturn(true);
    when(route.allowedMethods()).thenReturn(EnumSet.of(delete));
    when(route.resourceMethod(request, "/clients/add")).thenReturn(method);
View Full Code Here


    MutableRequest request = info.getRequest();
    String resourceName = info.getRequestedUri();

    logger.debug("trying to access {}", resourceName);

    HttpMethod method;
    try {
      method = HttpMethod.of(request);
    } catch (IllegalArgumentException e) {
      throw new MethodNotAllowedException(router.allowedMethodsFor(resourceName), request.getMethod());
    }
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.resource.HttpMethod

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.