Refactor rest_request on Brapi::Client