Receiving nullable response with RestTemplate
I have a REST endpoint that returns certain object or 202 Accepted with empty response entity. How can I process both cases with rest template? getForEntity(url, MyClass) or exchange(... MyClass) throws null pointer exception when gets 202.