[#634] Avoid unnecessary casting

* Rely on RestResponse parameter, and its base properties