Fix non null HttpEntity in Rest requests