You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/se/webclient.adoc
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ WebClient offers a set of request methods that are used to specify the type of a
99
99
* `put()`
100
100
* `method(String methodName)`
101
101
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.
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:
152
152
153
153
* Using plain socket triggers WebClient to process a request using `HTTP/1.1`.
154
154
* 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()
162
162
* If `HTTP/2` is used, an upgrade attempt will be performed. If it fails, the client falls-back to `HTTP/1.1`.
163
163
* 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`.
164
164
165
-
=== Adding Media Support to the WebClient
165
+
=== Adding Media Support
166
166
167
167
Webclient supports the following built-in Helidon Media Support libraries:
168
168
@@ -237,9 +237,6 @@ Webclient provides three DNS resolver implementations out of the box:
237
237
</dependency>
238
238
----
239
239
240
-
=== Adding Service
241
-
242
-
243
240
== Configuring the WebClient
244
241
245
242
The class responsible for WebClient configuration is:
Configure TLS either programmatically or by the Helidon configuration framework.
392
388
@@ -423,7 +419,10 @@ webclient:
423
419
resource:
424
420
resource-path: "client.p12"
425
421
----
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.
427
426
428
427
[source,java]
429
428
.WebClient initialization using the `application.yaml` file located on the classpath
0 commit comments