dany giguere
09/21/2022, 6:53 PMrestTemplate.exchange(uri, <http://HttpMethod.POST|HttpMethod.POST>, request, Response.class);
the problem is that the response is an array that contains an object. How could I make the Response class to return an array ? I tried doing:
restTemplate.exchange(uri, <http://HttpMethod.POST|HttpMethod.POST>, request, ArrayList<Response>.class);
(then I would not need to return the class as an array) But I can only do ArrayList.class
. It won’t take the <>
Thomas
09/21/2022, 7:12 PMnew ParameterizedTypeReference<ArrayList<Response>>() {}
- a typed class is lost when passed as an argumentdany giguere
09/21/2022, 7:42 PMThomas
09/21/2022, 7:42 PMNeuvine D'Souza
09/22/2022, 5:29 PM<http://restTemplate.post|restTemplate.post><ArrayList<Response>>(uri, request)