@Test public void test_should_add_correlation_id_to_request_info_section_of_request_body() throws IOException { final RequestContext currentContext = RequestContext.getCurrentContext(); final MockHttpServletRequest request = new MockHttpServletRequest(); request.setMethod("POST"); request.setRequestURI("http: request.setContentType(MediaType.APPLICATION_JSON_UTF8_VALUE); request.setContent(getContent("postRequestFromConsumer.json")); currentContext.setRequest(request); final String expectedCorrelationId = "someCorrelationId"; currentContext.set("CORRELATION_ID", expectedCorrelationId); currentContext.set("USER_INFO", null); filter.run(); String expectedBody = resources.getFileContents("postRequestWithCorrelationId.json"); assertEquals(expectedBody, IOUtils.toString(currentContext.getRequest().getInputStream())); }
@Override public Object run() { modifyRequestBody(); addRequestHeaders(); return null; }
RequestEnrichmentFilter extends ZuulFilter { @Override public Object run() { modifyRequestBody(); addRequestHeaders(); return null; } }
RequestEnrichmentFilter extends ZuulFilter { @Override public Object run() { modifyRequestBody(); addRequestHeaders(); return null; } RequestEnrichmentFilter(); }
RequestEnrichmentFilter extends ZuulFilter { @Override public Object run() { modifyRequestBody(); addRequestHeaders(); return null; } RequestEnrichmentFilter(); @Override String filterType(); @Override int filterOrder(); @Override boolean shouldFilter(); @Override Object run(); }
RequestEnrichmentFilter extends ZuulFilter { @Override public Object run() { modifyRequestBody(); addRequestHeaders(); return null; } RequestEnrichmentFilter(); @Override String filterType(); @Override int filterOrder(); @Override boolean shouldFilter(); @Override Object run();  }