minor refactor of RestRequest to support other REST clients