@ -57,41 +56,41 @@ public final class WebClientAdapter implements HttpClientAdapter {
@@ -57,41 +56,41 @@ public final class WebClientAdapter implements HttpClientAdapter {
@ -371,7 +371,7 @@ methods for HTTP exchanges. You can then generate a proxy that implements this i
@@ -371,7 +371,7 @@ methods for HTTP exchanges. You can then generate a proxy that implements this i
and performs the exchanges. This helps to simplify HTTP remote access which often
involves a facade that wraps the details of using the underlying HTTP client.
To start, declare an interface with annotated, HTTP exchange methods:
One, declare an interface with `@HttpExchange` methods:
[source,java,indent=0,subs="verbatim,quotes"]
----
@ -385,8 +385,7 @@ To start, declare an interface with annotated, HTTP exchange methods:
@@ -385,8 +385,7 @@ To start, declare an interface with annotated, HTTP exchange methods:
}
----
Now you create a proxy for the interface that performs the declared exchanges through
the `WebClient`:
Two, create a proxy that will perform the declared HTTP exchanges:
[source,java,indent=0,subs="verbatim,quotes"]
----
@ -396,7 +395,7 @@ the `WebClient`:
@@ -396,7 +395,7 @@ the `WebClient`:
RepositoryService service = factory.createClient(RepositoryService.class);
----
An HTTP service interface can declare common attributes at the type level:
`@HttpExchange` is supported at the type level where it applies to all methods:
[source,java,indent=0,subs="verbatim,quotes"]
----
@ -504,6 +503,27 @@ TIP: You can also use any other async or reactive types registered in the
@@ -504,6 +503,27 @@ TIP: You can also use any other async or reactive types registered in the
`ReactiveAdapterRegistry`.
[[rest-http-interface-exceptions]]
==== Exception Handling
By default, `WebClient` raises `WebClientResponseException` for 4xx and 5xx HTTP status
codes. To customize this, you can register a response status handler that applies to all