i want to call REST API Controller from my REST API Controller.
"http://localhost:8080/function/1?filter={"id":1435263}"
Since we cannot send directly ({"id":1435263})JSON query String along with url because of spring mvc cannot read "{",i am sending query string(Search variables) in the form of map .
Object response = restTemplate.getForObject(crudControllerURL,
Object.class, map);
where map contains the values .
On Server side i am unable to retrieve this map. I tried @RequestParam Object obj but it did not work . I am clueless how can i get these values there?
Do i need to convert it into POST?
EDIT
when i try to use whole url with query String then i recieve
java.lang.IllegalArgumentException: Not enough variable values available to expand '"id"'
Adding Server side contoller code snippet(not whole) and please note i need to access map in Server REST API Controller . Server side controller
@RequestMapping(value = "/{function}/{type}", method = RequestMethod.GET)
public List<Order> performFetchAll(@PathVariable String function,
HttpServletRequest request) throws JsonParseException,
JsonMappingException, IOException, InvalidAttributesException {
String requestQueryString = request.getQueryString();
if (requestQueryString == null
|| requestQueryString.equalsIgnoreCase(""))
return orderService.findAll();
Please provide your feedback. Thanks.