title: How to set proxy with authorization to Spring Webflux WebClient (ReactorClientHttpConnector)?
body: <p>I´m using Spring WebClient into a library to consume an API, but I need to setup a proxy with authentication to do the call behind a proxy server.</p>
  <p>How can I do this?</p>
  <pre class="lang-java prettyprint-override"><code>String myUrl = &quot;https://api.mycompany.com/api/my-resource&quot;;
  
  WebClient webClient = WebClient.builder().build();
  
  String result = webClient.get().uri(myUrl)
            .header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE)
            .header(HttpHeaders.ACCEPT_CHARSET, StandardCharsets.UTF_8.name())
            .header(HttpHeaders.HOST, &quot;mycompany.com&quot;)
            .retrieve()
            .bodyToMono(String.class)
            .block();
  
  // TODO: How to set the proxy into WebClient?
  
  // TODO: how to set the proxy authorization?
  
  </code></pre>