2017-10-14 01:24:33 +08:00
|
|
|
[[webmvc-client]]
|
|
|
|
= REST Clients
|
|
|
|
|
|
|
|
This section describes options for client-side access to REST endpoints.
|
|
|
|
|
2017-10-19 02:24:17 +08:00
|
|
|
|
|
|
|
|
2018-10-25 21:15:58 +08:00
|
|
|
|
2023-07-07 20:00:34 +08:00
|
|
|
[[webmvc-restclient]]
|
|
|
|
== `RestClient`
|
2017-10-14 01:24:33 +08:00
|
|
|
|
2023-07-07 20:00:34 +08:00
|
|
|
`RestClient` is a synchronous HTTP client that exposes a modern, fluent API.
|
2017-10-14 01:24:33 +08:00
|
|
|
|
2023-07-07 20:00:34 +08:00
|
|
|
See xref:integration/rest-clients.adoc#rest-restclient[`RestClient`] for more details.
|
2017-10-14 01:24:33 +08:00
|
|
|
|
2017-10-19 02:24:17 +08:00
|
|
|
|
|
|
|
|
2018-10-25 21:15:58 +08:00
|
|
|
|
2017-10-14 01:24:33 +08:00
|
|
|
[[webmvc-webclient]]
|
2018-10-06 03:54:38 +08:00
|
|
|
== `WebClient`
|
2017-10-14 01:24:33 +08:00
|
|
|
|
2023-07-07 20:00:34 +08:00
|
|
|
`WebClient` is a reactive client to perform HTTP requests with a fluent API.
|
|
|
|
|
|
|
|
See xref:web/webflux-webclient.adoc[WebClient] for more details.
|
2017-10-14 01:24:33 +08:00
|
|
|
|
2018-08-14 20:48:14 +08:00
|
|
|
|
|
|
|
|
2022-05-09 16:49:28 +08:00
|
|
|
|
2023-07-07 20:00:34 +08:00
|
|
|
[[webmvc-resttemplate]]
|
|
|
|
== `RestTemplate`
|
2022-05-09 16:49:28 +08:00
|
|
|
|
2023-07-07 20:00:34 +08:00
|
|
|
`RestTemplate` is a synchronous client to perform HTTP requests. It is the original
|
|
|
|
Spring REST client and exposes a simple, template-method API over underlying HTTP client
|
|
|
|
libraries.
|
2022-05-09 16:49:28 +08:00
|
|
|
|
2023-07-07 20:00:34 +08:00
|
|
|
See xref:integration/rest-clients.adoc[REST Endpoints] for details.
|
2022-05-09 16:49:28 +08:00
|
|
|
|
|
|
|
[[webmvc-http-interface]]
|
|
|
|
== HTTP Interface
|
|
|
|
|
|
|
|
The Spring Frameworks lets you define an HTTP service as a Java interface with HTTP
|
|
|
|
exchange methods. You can then generate a proxy that implements this interface and
|
|
|
|
performs the exchanges. This helps to simplify HTTP remote access and provides additional
|
|
|
|
flexibility for to choose an API style such as synchronous or reactive.
|
|
|
|
|
2023-04-19 23:26:17 +08:00
|
|
|
See xref:integration/rest-clients.adoc#rest-http-interface[REST Endpoints] for details.
|