Skip to content

Commit d80cfef

Browse files
committed
Update sample code to use Builder
1 parent 6a3c91c commit d80cfef

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,10 @@ String bodyResponse = f.get();
149149
Finally, you can also configure the AsyncHttpClient via its AsyncHttpClientConfig object:
150150

151151
```java
152-
AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder()
153-
.setProxyServer(new ProxyServer("127.0.0.1", 38080)).build();
154-
AsyncHttpClient c = new AsyncHttpClient(cf);
152+
AsyncHttpClientConfig cf = new DefaultAsyncHttpClientConfig.Builder()
153+
.setProxyServer(new ProxyServer.Builder("127.0.0.1", 38080)).build();
154+
155+
AsyncHttpClient c = new DefaultAsyncHttpClient(cf);
155156
```
156157

157158
## WebSocket

0 commit comments

Comments
 (0)