0

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);

}
Jaba
  • 11
  • 4
  • maybe this question can help you: you:https://stackoverflow.com/questions/49195867/spring-feign-could-not-extract-response-no-suitable-httpmessageconverter-found/ – Tiago Aleff da Silva Mar 07 '22 at 20:10
  • Perhaps these following solution can help you: https://stackoverflow.com/a/69348918/8468940 https://stackoverflow.com/a/49199796/8468940 – Tiago Aleff da Silva Mar 07 '22 at 20:16

0 Answers0