parent
0d4010841e
commit
c43d2e2edc
|
@ -495,11 +495,10 @@ method parameters:
|
||||||
[[rest-http-interface-return-values]]
|
[[rest-http-interface-return-values]]
|
||||||
=== Return Values
|
=== Return Values
|
||||||
|
|
||||||
The supported return values vary depending on whether you are using
|
The supported return values depend on the underlying client.
|
||||||
`HttpExchangeAdapter` or `ReactorHttpExchangeAdapter`.
|
|
||||||
|
|
||||||
When using `HttpExchangeAdapter`, annotated HTTP exchange methods support
|
Clients adapted to `HttpExchangeAdapter` such as `RestClient` and `RestTemplate`
|
||||||
the following return values:
|
support synchronous return values:
|
||||||
|
|
||||||
[cols="1,2", options="header"]
|
[cols="1,2", options="header"]
|
||||||
|===
|
|===
|
||||||
|
@ -523,9 +522,9 @@ the following return values:
|
||||||
|
|
||||||
|===
|
|===
|
||||||
|
|
||||||
When using `ReactorHttpExchangeAdapter`, annotated HTTP exchange methods support
|
Clients adapted to `ReactorHttpExchangeAdapter` such as `WebClient`, support all of above
|
||||||
all the same values as the ones supported by `HttpExchangeAdapter`
|
as well as reactive variants. The table below shows Reactor types, but you can also use
|
||||||
and also the following ones:
|
other reactive types that are supported through the `ReactiveAdapterRegistry`:
|
||||||
|
|
||||||
[cols="1,2", options="header"]
|
[cols="1,2", options="header"]
|
||||||
|===
|
|===
|
||||||
|
@ -560,16 +559,10 @@ response body stream.
|
||||||
|
|
||||||
|===
|
|===
|
||||||
|
|
||||||
TIP: You can also use any other async or reactive types registered in the
|
By default, the timeout for synchronous return values with `ReactorHttpExchangeAdapter`
|
||||||
`ReactiveAdapterRegistry`.
|
depends on how the underlying HTTP client is configured. You can set a `blockTimeout`
|
||||||
|
value on the adapter level as well, but we recommend relying on timeout settings of the
|
||||||
While using the `ReactorHttpExchangeAdapter`, by default, the behavior
|
underlying HTTP client, which operates at a lower level and provides more control.
|
||||||
of HTTP service methods with synchronous (blocking) method
|
|
||||||
signature depends on connection and timeout settings of the underlying HTTP client.
|
|
||||||
`HttpServiceProxyFactory.Builder` does expose a `blockTimeout` option that also lets you
|
|
||||||
configure the maximum time to block for a response, but we recommend configuring timeout
|
|
||||||
values directly on the underlying HTTP client, which likely provides more control over
|
|
||||||
such settings.
|
|
||||||
|
|
||||||
|
|
||||||
[[rest-http-interface-exceptions]]
|
[[rest-http-interface-exceptions]]
|
||||||
|
|
Loading…
Reference in New Issue