Skip to content

Commit a891a1c

Browse files
authored
Merge pull request MicrosoftDocs#1441 from christarczon/patch-1
Add Maven dependency for JDK HttpClient; update versions
2 parents 6ebf9b8 + e0690cb commit a891a1c

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

articles/java/sdk/http-client-pipeline.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The following example shows you how to exclude the Netty dependency from a real
3636
<dependency>
3737
<groupId>com.azure</groupId>
3838
<artifactId>azure-security-keyvault-secrets</artifactId>
39-
<version>4.2.2.</version>
39+
<version>4.9.4</version>
4040
<exclusions>
4141
<exclusion>
4242
<groupId>com.azure</groupId>
@@ -45,10 +45,18 @@ The following example shows you how to exclude the Netty dependency from a real
4545
</exclusions>
4646
</dependency>
4747

48+
<!-- OkHttp -->
4849
<dependency>
4950
<groupId>com.azure</groupId>
5051
<artifactId>azure-core-http-okhttp</artifactId>
51-
<version>1.3.3</version>
52+
<version>1.12.10</version>
53+
</dependency>
54+
55+
<!-- JDK HttpClient -->
56+
<dependency>
57+
<groupId>com.azure</groupId>
58+
<artifactId>azure-core-http-jdk-httpclient</artifactId>
59+
<version>1.0.3</version>
5260
</dependency>
5361
```
5462

@@ -59,7 +67,7 @@ The following example shows you how to exclude the Netty dependency from a real
5967

6068
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`.
6169

62-
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`.
70+
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`.
6371

6472
```java
6573
// Netty
@@ -74,7 +82,7 @@ HttpClient httpClient = new OkHttpAsyncHttpClientBuilder()
7482
.setCredentials("example", "weakPassword"))
7583
.build();
7684

77-
// JDK 11 HttpClient
85+
// JDK HttpClient
7886
HttpClient client = new JdkAsyncHttpClientBuilder()
7987
.proxy(new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("localhost", 3128))
8088
.setCredentials("example", "weakPassword"))

0 commit comments

Comments
 (0)