spring-framework/framework-docs/modules/ROOT/pages/web/webmvc-client.adoc

42 lines
1.2 KiB
Plaintext
Raw Normal View History

[[webmvc-client]]
= REST Clients
This section describes options for client-side access to REST endpoints.
[[webmvc-restclient]]
== `RestClient`
`RestClient` is a synchronous HTTP client that exposes a modern, fluent API.
See xref:integration/rest-clients.adoc#rest-restclient[`RestClient`] for more details.
[[webmvc-webclient]]
== `WebClient`
2025-08-29 23:25:15 +08:00
`WebClient` is a reactive client for making HTTP requests with a fluent API.
2025-08-29 23:25:15 +08:00
See xref:web/webflux-webclient.adoc[`WebClient`] for more details.
[[webmvc-resttemplate]]
== `RestTemplate`
2025-08-29 23:25:15 +08:00
`RestTemplate` is a synchronous client for making HTTP requests. It is the original
Spring REST client and exposes a simple, template-method API over underlying HTTP client
libraries.
2025-08-29 23:25:15 +08:00
See xref:integration/rest-clients.adoc#rest-resttemplate[`RestTemplate`] for details.
[[webmvc-http-interface]]
== HTTP Interface
2025-08-29 23:25:15 +08:00
The Spring Framework 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
2025-08-29 23:25:15 +08:00
flexibility for choosing an API style such as synchronous or reactive.
2025-08-29 23:25:15 +08:00
See xref:integration/rest-clients.adoc#rest-http-interface[HTTP Interface] for details.