I am trying to consume a (GET) rest service.
http://localhost:7010/abc/status?configFilePath=config%2Fconfig.properties
I am trying to use that using the Spring RestTemplate service
Below is the code which I have used for the restTemplate:
String configFile = "config/config.properties";
Map<String,String> restvars = new HashMap<String,String>();
restvars.put("configFilePath", configFile);
RestTemplate restTemplate = new RestTemplate();
String restUrl = http://localhost:7010/abc/status?
String restCall = restTemplate.getForObject(restUrl, String.class, restvars);
System.out.println(restCall.toString());
It throws
Required String parameter 'configFilePath' is not present
Doesn't the Map actually pass the parameters ?