Package de.terrestris.shoguncore.web
Class HttpProxyController
- java.lang.Object
-
- de.terrestris.shoguncore.web.HttpProxyController
-
@Controller public class HttpProxyController extends Object
Controller for simple HTTP Proxy service (forward proxy)- Author:
- Andre Henn, terrestris GmbH & co. KG
-
-
Constructor Summary
Constructors Constructor Description HttpProxyController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<?>doProxy(javax.servlet.http.HttpServletRequest request, String baseUrl, Map<String,String> params)Web controller mapping proxy.action to doProxy method.voidsetProxyService(HttpProxyService proxyService)The setter method ofHttpProxyService
-
-
-
Method Detail
-
doProxy
@RequestMapping("/proxy.action") @ResponseBody public org.springframework.http.ResponseEntity<?> doProxy(javax.servlet.http.HttpServletRequest request, @RequestParam String baseUrl, @RequestParam(required=false) Map<String,String> params)Web controller mapping proxy.action to doProxy method. Provided parameters are passed toHttpProxyService- Parameters:
request-HttpServletRequestto use in proxy (e.g. to obtain headers from)baseUrl- The base url of requestparams- Request params- Returns:
- ResponseEntity
-
setProxyService
public void setProxyService(HttpProxyService proxyService)
The setter method ofHttpProxyService- Parameters:
proxyService-HttpProxyServiceto set
-
-