Universal REST API client in Java