Java Code Examples for org.springframework.mock.web.test.MockFilterChain#getRequest()
The following examples show how to use
org.springframework.mock.web.test.MockFilterChain#getRequest() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MvcUriComponentsBuilderTests.java From spring-analysis-note with MIT License | 4 votes |
private void adaptRequestFromForwardedHeaders() throws Exception { MockFilterChain chain = new MockFilterChain(); new ForwardedHeaderFilter().doFilter(this.request, new MockHttpServletResponse(), chain); HttpServletRequest adaptedRequest = (HttpServletRequest) chain.getRequest(); RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(adaptedRequest)); }
Example 2
Source File: ServletUriComponentsBuilderTests.java From spring-analysis-note with MIT License | 4 votes |
private HttpServletRequest adaptFromForwardedHeaders(HttpServletRequest request) throws Exception { MockFilterChain chain = new MockFilterChain(); new ForwardedHeaderFilter().doFilter(request, new MockHttpServletResponse(), chain); return (HttpServletRequest) chain.getRequest(); }
Example 3
Source File: WebUtilsTests.java From spring-analysis-note with MIT License | 4 votes |
private HttpServletRequest adaptFromForwardedHeaders(HttpServletRequest request) throws Exception { MockFilterChain chain = new MockFilterChain(); new ForwardedHeaderFilter().doFilter(request, new MockHttpServletResponse(), chain); return (HttpServletRequest) chain.getRequest(); }
Example 4
Source File: MvcUriComponentsBuilderTests.java From java-technology-stack with MIT License | 4 votes |
private void adaptRequestFromForwardedHeaders() throws Exception { MockFilterChain chain = new MockFilterChain(); new ForwardedHeaderFilter().doFilter(this.request, new MockHttpServletResponse(), chain); HttpServletRequest adaptedRequest = (HttpServletRequest) chain.getRequest(); RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(adaptedRequest)); }
Example 5
Source File: ServletUriComponentsBuilderTests.java From java-technology-stack with MIT License | 4 votes |
private HttpServletRequest adaptFromForwardedHeaders(HttpServletRequest request) throws Exception { MockFilterChain chain = new MockFilterChain(); new ForwardedHeaderFilter().doFilter(request, new MockHttpServletResponse(), chain); return (HttpServletRequest) chain.getRequest(); }
Example 6
Source File: WebUtilsTests.java From java-technology-stack with MIT License | 4 votes |
private HttpServletRequest adaptFromForwardedHeaders(HttpServletRequest request) throws Exception { MockFilterChain chain = new MockFilterChain(); new ForwardedHeaderFilter().doFilter(request, new MockHttpServletResponse(), chain); return (HttpServletRequest) chain.getRequest(); }