Skip to content

Commit 61181fb

Browse files
author
Keith Lustria
authored
6456 webclient doc part2 4.x (helidon-io#7845)
* Doc clean up * Add note to refer to "Configuration Secrets" if encryption of secrets is needed
1 parent f71f3b6 commit 61181fb

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

docs/se/webclient.adoc

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ WebClient offers a set of request methods that are used to specify the type of a
9999
* `put()`
100100
* `method(String methodName)`
101101
102-
Check out link:{webclient-javadoc-base-url}.api/io/helidon/webclient/api/HttpClient.html[HttpClient.html] API to learn more about request methods. These methods will create a new instance of link:{webclient-javadoc-base-url}.api/io/helidon/webclient/api/HttpClientRequest.html[HttpClientRequest] which can then be configured to add optional settings that will customize the behavior of the request.
102+
Check out link:{webclient-javadoc-base-url}.api/io/helidon/webclient/api/HttpClient.html[HttpClient] API to learn more about request methods. These methods will create a new instance of link:{webclient-javadoc-base-url}.api/io/helidon/webclient/api/HttpClientRequest.html[HttpClientRequest] which can then be configured to add optional settings that will customize the behavior of the request.
103103
104104
=== Customizing the Request
105105
@@ -147,8 +147,8 @@ ClientResponseTyped<String> response = webClient.get()
147147
String entityString = response.entity();
148148
----
149149
150-
=== Protocol used
151-
Webclient currently supports `HTTP/1.1` and `HTTP/2` protocols. Below are the rules on which specific protocol will be used:
150+
=== Protocol Used
151+
WebClient currently supports `HTTP/1.1` and `HTTP/2` protocols. Below are the rules on which specific protocol will be used:
152152
153153
* Using plain socket triggers WebClient to process a request using `HTTP/1.1`.
154154
* When using TLS, the client will use ALPN (protocol negotiation) to use appropriate HTTP version (either 1.1, or 2). `HTTP/2` has a higher weight, so it is chosen if supported by both sides.
@@ -162,7 +162,7 @@ String result = webClient.get()
162162
* If `HTTP/2` is used, an upgrade attempt will be performed. If it fails, the client falls-back to `HTTP/1.1`.
163163
* The parameter `prior-knowledge` can be defined using `HTTP/2` protocol configuration. Please refer to <<Setting Protocol configuration>> on how to customize `HTTP/2`. In such a case, `prior-knowledge` will be used and fail if it is unable to switch to `HTTP/2`.
164164
165-
=== Adding Media Support to the WebClient
165+
=== Adding Media Support
166166
167167
Webclient supports the following built-in Helidon Media Support libraries:
168168
@@ -237,9 +237,6 @@ Webclient provides three DNS resolver implementations out of the box:
237237
</dependency>
238238
----
239239
240-
=== Adding Service
241-
242-
243240
== Configuring the WebClient
244241
245242
The class responsible for WebClient configuration is:
@@ -385,8 +382,7 @@ Config config = Config.create();
385382
WebClient webClient = WebClient.create(config.get("webclient"));
386383
----
387384
388-
389-
=== WebClient TLS setup
385+
=== WebClient TLS Setup
390386
391387
Configure TLS either programmatically or by the Helidon configuration framework.
392388
@@ -423,7 +419,10 @@ webclient:
423419
resource:
424420
resource-path: "client.p12"
425421
----
426-
Then, in your application code, load the configuration from that file.
422+
423+
NOTE: The `passphrase` value on the config file can be encrypted if stronger security is required. For more information on how secrets can be encrypted using a master password and store them in a configuration file, please see xref:{rootdir}/mp/security/configuration-secrets.adoc[Configuration Secrets].
424+
425+
In the application code, load the settings from the configuration file.
427426
428427
[source,java]
429428
.WebClient initialization using the `application.yaml` file located on the classpath

0 commit comments

Comments
 (0)