code: def _exec_request(self, service, method=None, path_args=None, data=None,
                        params=None):
          
          if path_args is None:
              path_args = []
  
          req = {
              'method': method or 'get',
              'url': '/'.join(str(a).strip('/') for a in [
                  cfg.CONF.tvdb.service_url, service] + path_args),
              'data': json.dumps(data) if data else None,
              'headers': self.headers,
              'params': params,
              'verify': cfg.CONF.tvdb.verify_ssl_certs,
          }
  
          LOG.debug('executing request (%s %s)', req['method'], req['url'])
          resp = self.session.request(**req)
  
          resp.raise_for_status()
          return resp.json() if resp.text else resp.text
docs: Execute request.