refactoring to include get_status_code for JSONResponseMixin