def __init__(self,
                 request,
                 n=10,
                 interval=0,
                 ensure_response=None,
                 retry=0,
                 timeout=10,
                 logger_function=None,
                 encoding='utf-8',
                 **kwargs):
        """request: dict or curl-string or url.
        Cookie need to be set in headers."""
        #: request args which can be ignored.
        self.ignore = {
            'qsl': [],
            'Cookie': [],
            'headers': [],
            'json_data': [],
            'form_data': [],
            'total_data': []
        }
        super(CleanRequest, self).__init__(
            request=request,
            n=n,
            interval=interval,
            ensure_response=ensure_response,
            retry=retry,
            timeout=timeout,
            logger_function=logger_function,
            encoding=encoding,
            **kwargs)
        #: The list of async-requests task.
        self.tasks = []
        #: If the post-data should be seen as json.
        self.has_json_data = False
        #: The cleaned request to be return at last.
        self.new_request = deepcopy(self.request)
def __init__ ( self , request , n = 10 , interval = 0 , ensure_response = None , retry = 0 , timeout = 10 , logger_function = None , encoding = 'utf-8' , ** kwargs ) : self . ignore = { 'qsl' : [ ] , 'Cookie' : [ ] , 'headers' : [ ] , 'json_data' : [ ] , 'form_data' : [ ] , 'total_data' : [ ] } super ( CleanRequest , self ) . __init__ ( request = request , n = n , interval = interval , ensure_response = ensure_response , retry = retry , timeout = timeout , logger_function = logger_function , encoding = encoding , ** kwargs ) self . tasks = [ ] self . has_json_data = False self . new_request = deepcopy ( self . request )
request: dict or curl-string or url.
        Cookie need to be set in headers.