Package org.jboss.resteasy.spi

Examples of org.jboss.resteasy.spi.HttpRequest


              MediaType.valueOf("*/*;q=0.8")
      );

      String param1 = URLEncoder.encode("application/xml;q=0.9,application/xhtml+xml,*/*;q=0.8", "UTF-8");
      String param2 = URLEncoder.encode("text/html", "UTF-8");
      HttpRequest request = MockHttpRequest.get(
              "foo?" + acceptParamName + "=" + param1 + "&" +
                      acceptParamName + "=" + param2);

      PreMatchContainerRequestContext context = new PreMatchContainerRequestContext(request);
      processor.filter(context);

      List<MediaType> actual = request.getHttpHeaders().getAcceptableMediaTypes();

      Assert.assertEquals("Incorrect acceptable media type extracted", expected, actual);
   }
View Full Code Here


            logger.warn("Failed to parse request.", e);
            return;
         }

         HttpResponse theResponse = responseFactory.createResteasyHttpResponse(response);
         HttpRequest in = requestFactory.createResteasyHttpRequest(httpMethod, request, headers, uriInfo, theResponse, response);

         try
         {
            ResteasyProviderFactory.pushContext(HttpServletRequest.class, request);
            ResteasyProviderFactory.pushContext(HttpServletResponse.class, response);
View Full Code Here

   private Response.ResponseBuilder builder;

   @Before
   public void before() throws URISyntaxException
   {
      HttpRequest httpRequest = MockHttpRequest.create("GET", REQUEST_URI,
              BASE_URI);

      ResteasyProviderFactory.getContextDataMap().put(HttpRequest.class,
              httpRequest);
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.spi.HttpRequest

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.