In this post under Spring RestTemplate, I will show with example the purpose and how to use path parameter. If we have to make a call to get the “Post” data with id 1 from “http://jsonplaceholder.typicode.com”. Our url will be http://jsonplaceholder.typicode.com/posts/1 Now if I have to make a call to get the “Post” data with…… Continue reading Path Parameter example
Month: May 2025
getForObject example
In this post under Spring RestTemplate, I will explain with example the purpose of “getForObject” method. “getForObject” method is provided by RestTemplate to make GET HTTP calls. Below is the main method showing how to use it Main class package package1; import org.springframework.web.client.RestTemplate; public class Example1 { public static void main(String[] args) { RestTemplate restTemplate…… Continue reading getForObject example