Skip to content

Commit 83e3437

Browse files
authored
WebClient generated doc enhancements. (helidon-io#6736)
1 parent 2be85df commit 83e3437

2 files changed

Lines changed: 15 additions & 8 deletions

File tree

docs/config/io_helidon_webclient_WebClientConfiguration.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
///////////////////////////////////////////////////////////////////////////////
22

3-
Copyright (c) 2022 Oracle and/or its affiliates.
3+
Copyright (c) 2023 Oracle and/or its affiliates.
44

55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -49,18 +49,18 @@ This is a standalone configuration type, prefix from configuration root: `client
4949
|`connect-timeout-millis` |long |`60000` |Sets new connection timeout of the request.
5050
|`cookies.automatic-store-enabled` |boolean |{nbsp} |Whether to allow automatic cookie storing
5151
|`cookies.default-cookies` |Map |{nbsp} |Default cookies to be used in each request. Each list entry has to have "name" and "value" node
52+
|`dns-resolver-type` |DnsResolverType (DEFAULT, ROUND_ROBIN, NONE) |{nbsp} |Set which type of DNS resolver should be used.
5253
|`follow-redirects` |boolean |`false` |Whether to follow any response redirections or not.
5354
|`headers` |Map |{nbsp} |Default headers to be used in each request. Each list entry has to have "name" and "value" node
55+
|`keep-alive` |boolean |`true` |Enable keep alive option on the connection.
5456
|`max-redirects` |int |`5` |Sets max number of followed redirects.
5557
|`media-support` |xref:{rootdir}/config/io_helidon_media_common_MediaContext.adoc[MediaContext] |{nbsp} |
5658
|`proxy` |xref:{rootdir}/config/io_helidon_webclient_Proxy.adoc[Proxy] |{nbsp} |Sets new request proxy.
5759
|`read-timeout-millis` |long |`600000` |Sets new read timeout of the response.
5860
|`relative-uris` |boolean |`false` |Can be set to `true` to force the use of relative URIs in all requests,
5961
regardless of the presence or absence of proxies or no-proxy lists.
6062
|`tls` |xref:{rootdir}/config/io_helidon_webclient_WebClientTls.adoc[WebClientTls] |{nbsp} |New TLS configuration.
61-
|`uri` |string |{nbsp} |Base uri for each request.
62-
63-
@return updated builder instance
63+
|`uri` |string |{nbsp} |Base URI for each request
6464
|`user-agent` |string |{nbsp} |Name of the user agent which should be used.
6565
6666
|===

webclient/webclient/src/main/java/io/helidon/webclient/WebClientConfiguration.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2022 Oracle and/or its affiliates.
2+
* Copyright (c) 2019, 2023 Oracle and/or its affiliates.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -528,7 +528,7 @@ public B mediaContext(MediaContext mediaContext) {
528528
}
529529

530530
/**
531-
* Sets specific context in which all of the requests will be running.
531+
* Sets specific context in which all the requests will be running.
532532
*
533533
* @return updated builder instance
534534
*/
@@ -542,7 +542,8 @@ public B context(Context context) {
542542
*
543543
* @return updated builder instance
544544
*/
545-
@ConfiguredOption(type = String.class)
545+
@ConfiguredOption(type = String.class,
546+
description = "Base URI for each request")
546547
public B uri(URI uri) {
547548
this.uri = uri;
548549
return me;
@@ -634,8 +635,14 @@ B clientServices(List<WebClientService> clientServices) {
634635
return me;
635636
}
636637

638+
/**
639+
* Enable keep alive option on the connection.
640+
*
641+
* @param keepAlive keep alive value
642+
* @return updated builder instance
643+
*/
637644
@ConfiguredOption("true")
638-
B keepAlive(boolean keepAlive) {
645+
public B keepAlive(boolean keepAlive) {
639646
this.keepAlive = keepAlive;
640647
return me;
641648
}

0 commit comments

Comments
 (0)