public void request(WebRequest webRequest) { try { invocationContext = client.newInvocation(webRequest); rawRequest = new MyHttpRequest(invocationContext.getRequest(), webRequest.getURL().toExternalForm()); rawResponse = new MyHttpResponse(invocationContext.getResponse()); servletContext = invocationContext.getServlet().getServletConfig().getServletContext(); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } if (requestContexts != null) { requestContext = requestContexts.getRequestContext(servletContext, rawRequest, rawResponse); } }
public void request(WebRequest webRequest) { try { invocationContext = client.newInvocation(webRequest); rawRequest = new MyHttpRequest(invocationContext.getRequest(), webRequest.getURL().toExternalForm()); rawResponse = new MyHttpResponse(invocationContext.getResponse()); servletContext = invocationContext.getServlet().getServletConfig().getServletContext(); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } if (requestContexts != null) { requestContext = requestContexts.getRequestContext(servletContext, rawRequest, rawResponse); } }