perceval/client.py
def _create_http_session(self):
        """Create a http session and initialize the retry object."""

        self.session = requests.Session()

        if self.headers:
            self.session.headers.update(self.headers)

        retries = urllib3.util.Retry(total=self.max_retries,
                                     connect=self.max_retries_on_connect,
                                     read=self.max_retries_on_read,
                                     redirect=self.max_retries_on_redirect,
                                     status=self.max_retries_on_status,
                                     method_whitelist=self.method_whitelist,
                                     status_forcelist=self.status_forcelist,
                                     backoff_factor=self.sleep_time,
                                     raise_on_redirect=self.raise_on_redirect,
                                     raise_on_status=self.raise_on_status,
                                     respect_retry_after_header=self.respect_retry_after_header)

        self.session.mount('http://', requests.adapters.HTTPAdapter(max_retries=retries))
        self.session.mount('https://', requests.adapters.HTTPAdapter(max_retries=retries))
def _create_http_session(self):
        self.session = requests.Session()

        if self.headers:
            self.session.headers.update(self.headers)

        retries = urllib3.util.Retry(total=self.max_retries,
                                     connect=self.max_retries_on_connect,
                                     read=self.max_retries_on_read,
                                     redirect=self.max_retries_on_redirect,
                                     status=self.max_retries_on_status,
                                     method_whitelist=self.method_whitelist,
                                     status_forcelist=self.status_forcelist,
                                     backoff_factor=self.sleep_time,
                                     raise_on_redirect=self.raise_on_redirect,
                                     raise_on_status=self.raise_on_status,
                                     respect_retry_after_header=self.respect_retry_after_header)

        self.session.mount('http://', requests.adapters.HTTPAdapter(max_retries=retries))
        self.session.mount('https://', requests.adapters.HTTPAdapter(max_retries=retries))
def _create_http_session ( self ) : self . session = requests . Session ( ) if self . headers : self . session . headers . update ( self . headers ) retries = urllib3 . util . Retry ( total = self . max_retries , connect = self . max_retries_on_connect , read = self . max_retries_on_read , redirect = self . max_retries_on_redirect , status = self . max_retries_on_status , method_whitelist = self . method_whitelist , status_forcelist = self . status_forcelist , backoff_factor = self . sleep_time , raise_on_redirect = self . raise_on_redirect , raise_on_status = self . raise_on_status , respect_retry_after_header = self . respect_retry_after_header ) self . session . mount ( 'http://' , requests . adapters . HTTPAdapter ( max_retries = retries ) ) self . session . mount ( 'https://' , requests . adapters . HTTPAdapter ( max_retries = retries ) )
Create a http session and initialize the retry object.
Create a http session and initialize the retry object .