I use Feign in my micro service. Sometimes my code gets (as response from remote client) 200 OK with body, but sometimes 204 without and I got here NPE. Is it possible to set body by default? or check whits is respose code and dont wait for body payload? This is my code
@FeignClient(name = "ppppp", url = "${ppppp.url}")
public interface PClient {
@PostMapping("/search")
ResponseEntity<MyResult> searchAll(@RequestHeader("User") String user);
}