VMware vRealize Automation 8.x (2022) — Question 12
Which two statements are true regarding the RestTemplate class? (Choose two.)
Answer options
- A. It supports asynchronous non-blocking model.
- B. It automatically supports sending and receiving Java objects.
- C. It provides convenience methods for writing REST clients.
- D. It provides convenience methods for writing REST services.
- E. Sending an HTTP request with a custom header is not possible when using RestTemplate.
Correct answer: B, C
Explanation
Option B is correct because RestTemplate simplifies the process of sending and receiving Java objects through automatic serialization and deserialization. Option C is also correct as RestTemplate includes various convenience methods that facilitate the creation of REST clients. Options A, D, and E are incorrect because RestTemplate does not support an asynchronous non-blocking model, it is primarily for clients, and it does allow custom headers in HTTP requests.