Class HttpProxyController


  • @Controller
    public class HttpProxyController
    extends java.lang.Object
    Controller for simple HTTP Proxy service (forward proxy)
    Author:
    Andre Henn, terrestris GmbH & co. KG
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.http.ResponseEntity<?> doProxy​(javax.servlet.http.HttpServletRequest request, java.lang.String baseUrl, java.util.Map<java.lang.String,​java.lang.String> params)
      Web controller mapping proxy.action to doProxy method.
      void setProxyService​(HttpProxyService proxyService)
      The setter method of HttpProxyService
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpProxyController

        public HttpProxyController()
    • Method Detail

      • doProxy

        @RequestMapping("/proxy.action")
        @ResponseBody
        public org.springframework.http.ResponseEntity<?> doProxy​(javax.servlet.http.HttpServletRequest request,
                                                                  @RequestParam
                                                                  java.lang.String baseUrl,
                                                                  @RequestParam(required=false)
                                                                  java.util.Map<java.lang.String,​java.lang.String> params)
        Web controller mapping proxy.action to doProxy method. Provided parameters are passed to HttpProxyService
        Parameters:
        request - HttpServletRequest to use in proxy (e.g. to obtain headers from)
        baseUrl - The base url of request
        params - Request params
        Returns:
        ResponseEntity