How to proxy HTTP requests in Spring MVC?
I have an application built on top of Spring MVC. I want to write simple proxy that processes requests as follows: send the same HTTP request to some specific server capture HTTP response from this specific server return the same answer to requesting client Here is what I've got so far: public void proxyRequest(HttpServletRequest request, HttpServletResponse response) { try { HttpUriRequest proxiedRequest = createHttpUriRequest(request); HttpResponse proxiedResponse = httpClient.execute(proxiedRequest); writeToResponse(proxiedResponse, response); } catch (URISyntaxException e) { e