Implemented parts of APIRequest class.