From 28a9bd9796ba4ec3fdde21df492c75af2391e107 Mon Sep 17 00:00:00 2001 From: Chris Tarczon Date: Mon, 21 Apr 2025 15:28:21 -0500 Subject: [PATCH 1/2] Add Maven dependency for JDK HttpClient; update versions --- articles/java/sdk/http-client-pipeline.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/articles/java/sdk/http-client-pipeline.md b/articles/java/sdk/http-client-pipeline.md index 121bdb4b1..a9d1b023d 100644 --- a/articles/java/sdk/http-client-pipeline.md +++ b/articles/java/sdk/http-client-pipeline.md @@ -36,7 +36,7 @@ The following example shows you how to exclude the Netty dependency from a real com.azure azure-security-keyvault-secrets - 4.2.2. + 4.9.4 com.azure @@ -45,10 +45,18 @@ The following example shows you how to exclude the Netty dependency from a real + com.azure azure-core-http-okhttp - 1.3.3 + 1.12.10 + + + + + com.azure + azure-core-http-jdk-httpclient + 1.0.3 ``` From e0690cb652570455ad48bd932c7c46ae082ebefd Mon Sep 17 00:00:00 2001 From: Chris Tarczon Date: Tue, 22 Apr 2025 23:04:38 -0500 Subject: [PATCH 2/2] Refer to JDK HTTP client without version --- articles/java/sdk/http-client-pipeline.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/articles/java/sdk/http-client-pipeline.md b/articles/java/sdk/http-client-pipeline.md index a9d1b023d..8bd929933 100644 --- a/articles/java/sdk/http-client-pipeline.md +++ b/articles/java/sdk/http-client-pipeline.md @@ -52,7 +52,7 @@ The following example shows you how to exclude the Netty dependency from a real 1.12.10 - + com.azure azure-core-http-jdk-httpclient @@ -67,7 +67,7 @@ The following example shows you how to exclude the Netty dependency from a real When you build a service client, it defaults to using `HttpClient.createDefault()`. This method returns a basic `HttpClient` instance based on the provided HTTP client implementation. In case you require a more complex HTTP client, such as a proxy, each implementation offers a builder that allows you to construct a configured `HttpClient` instance. The builders are `NettyAsyncHttpClientBuilder`, `OkHttpAsyncHttpClientBuilder`, and `JdkAsyncHttpClientBuilder`. -The following examples show how to build `HttpClient` instances using Netty, OkHttp, and the JDK 11 HTTP client. These instances proxy through `http://localhost:3128` and authenticate with user `example` with password `weakPassword`. +The following examples show how to build `HttpClient` instances using Netty, OkHttp, and the JDK HTTP client. These instances proxy through `http://localhost:3128` and authenticate with user `example` with password `weakPassword`. ```java // Netty @@ -82,7 +82,7 @@ HttpClient httpClient = new OkHttpAsyncHttpClientBuilder() .setCredentials("example", "weakPassword")) .build(); -// JDK 11 HttpClient +// JDK HttpClient HttpClient client = new JdkAsyncHttpClientBuilder() .proxy(new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("localhost", 3128)) .setCredentials("example", "weakPassword"))