I'm trying to configure in my @FeignClient interface a POST request from where I want to extract a text/html Content-Type response; charset=ISO-8859-1 containing a JSON, but I don't know how to extract and work with this response in my application. If I expect a response of type String it cuts the information and if I model a ResponseDTO it gives an HttpMessageConverter error. Can someone help me?
JSON:
{
"result": [
{
"Par_Chave": "001 2222",
"Par_RazaoSocial": "TEST TESTING",
"Par_Nome": "TEST",
"Par_Documento": "11122233344"
}
]
}
Request:
@FeignClient(name = "clientCommerce", url = "http://localhost:8080", configuration = TCommerceConfig.class)
public interface TCommerceAPI {
@PostMapping(value = "/ConsultaRetaguarda", consumes = "text/html;charset=ISO-8859-1")
@Retry(name = "consultaRetaguarda")
String consultaRetaguarda(URI baseUrl, @RequestBody String innerBody);
}