@Test public void should_not_add_default_accept_headers() { Instance instance = Instance.create(InstanceId.of("id")) .register(Registration.create("test", wireMock.url("/status")).build()); wireMock.stubFor(get("/status").willReturn(ok())); Mono<ClientResponse> exchange = instanceWebClient.instance(instance) .get() .uri("health") .header(ACCEPT, MediaType.TEXT_XML_VALUE) .exchange(); StepVerifier.create(exchange).expectNextCount(1).verifyComplete(); wireMock.verify(1, getRequestedFor(urlEqualTo("/status")).withHeader(ACCEPT, equalTo(MediaType.TEXT_XML_VALUE)) ); }
public WebClient instance(Mono<Instance> instance) { return webClient.mutate() .filters(filters -> filters.add(0, InstanceExchangeFilterFunctions.setInstance(instance))) .build(); }
InstanceWebClient { public WebClient instance(Mono<Instance> instance) { return webClient.mutate() .filters(filters -> filters.add(0, InstanceExchangeFilterFunctions.setInstance(instance))) .build(); } }
InstanceWebClient { public WebClient instance(Mono<Instance> instance) { return webClient.mutate() .filters(filters -> filters.add(0, InstanceExchangeFilterFunctions.setInstance(instance))) .build(); } protected  InstanceWebClient(WebClient webClient); }
InstanceWebClient { public WebClient instance(Mono<Instance> instance) { return webClient.mutate() .filters(filters -> filters.add(0, InstanceExchangeFilterFunctions.setInstance(instance))) .build(); } protected  InstanceWebClient(WebClient webClient); WebClient instance(Mono<Instance> instance); WebClient instance(Instance instance); static InstanceWebClient.Builder builder(); }
InstanceWebClient { public WebClient instance(Mono<Instance> instance) { return webClient.mutate() .filters(filters -> filters.add(0, InstanceExchangeFilterFunctions.setInstance(instance))) .build(); } protected  InstanceWebClient(WebClient webClient); WebClient instance(Mono<Instance> instance); WebClient instance(Instance instance); static InstanceWebClient.Builder builder();  }