code: def perform_api_request(
          self,
          url,
          method='POST',
          headers=None,
          body=None,
          **kwargs
      ):
          '''
          Perform an auth-token-protected request against a CAS API endpoint.
          '''
          assert method in ('GET', 'POST')
          if method == 'GET':
              response = self._perform_get(url, headers=headers, **kwargs)
          elif method == 'POST':
              response = self._perform_post(url, headers=headers, data=body, **kwargs)
          return responsf perform_api_request(
          self,
          url,
          method='POST',
          headers=None,
          body=None,
          **kwargs
      ):
          '''
          Perform an auth-token-protected request against a CAS API endpoint.
          '''
          assert method in ('GET', 'POST')
          if method == 'GET':
              response = self._perform_get(url, headers=headers, **kwargs)
          elif method == 'POST':
              response = self._perform_post(url, headers=headers, data=body, **kwargs)
          return response
docs: Perform an auth-token-protected request against a CAS API endpoint.