code: def generate_payload(self, config, context):
          
          request = current_request()
  
          payload = {
              'url': request.build_absolute_uri(),
              'component': request.resolver_match.app_name,
              'action': request.resolver_match.func.__name__,
              'params': {},
              'session': {},
              'cgi_data': dict(request.META),
              'context': context
          }
  
          if hasattr(request, 'session'):
              payload['session'] = filter_dict(dict(request.session), config.params_filters)
  
          payload['params'] = filter_dict(dict(getattr(request, request.method)), config.params_filters)
  
          return payload
docs: Generate payload by checking Django request object.
          :param context: current context.
          :param config: honeybadger configuration.
          :return: a dict with the generated payload.