def patch_with_options(request, options, parent_queue_item=None):
        """Patch the given request with the given options (e.g. user agent).

        Args:
            request (:class:`nyawc.http.Request`): The request to patch.
            options (:class:`nyawc.Options`): The options to patch the request with.
            parent_queue_item (:class:`nyawc.QueueItem`): The parent queue item object (request/response pair) if exists.

        """

        request.auth = copy.deepcopy(options.identity.auth)
        request.cookies = copy.deepcopy(options.identity.cookies)
        request.headers = copy.deepcopy(options.identity.headers)
        request.proxies = copy.deepcopy(options.identity.proxies)
        request.timeout = copy.copy(options.performance.request_timeout)

        if parent_queue_item != None:
            for cookie in parent_queue_item.request.cookies:
                request.cookies.set(cookie.name, cookie.value, domain=cookie.domain, path=cookie.path)

            for cookie in parent_queue_item.response.cookies:
                request.cookies.set(cookie.name, cookie.value, domain=cookie.domain, path=cookie.path)

        if options.misc.verify_ssl_certificates and options.misc.trusted_certificates:
            request.verify = options.misc.trusted_certificates
        else:
            request.verify = options.misc.verify_ssl_certificates
def patch_with_options ( request , options , parent_queue_item = None ) : request . auth = copy . deepcopy ( options . identity . auth ) request . cookies = copy . deepcopy ( options . identity . cookies ) request . headers = copy . deepcopy ( options . identity . headers ) request . proxies = copy . deepcopy ( options . identity . proxies ) request . timeout = copy . copy ( options . performance . request_timeout ) if parent_queue_item != None : for cookie in parent_queue_item . request . cookies : request . cookies . set ( cookie . name , cookie . value , domain = cookie . domain , path = cookie . path ) for cookie in parent_queue_item . response . cookies : request . cookies . set ( cookie . name , cookie . value , domain = cookie . domain , path = cookie . path ) if options . misc . verify_ssl_certificates and options . misc . trusted_certificates : request . verify = options . misc . trusted_certificates else : request . verify = options . misc . verify_ssl_certificates
Patch the given request with the given options (e.g. user agent).

        Args:
            request (:class:`nyawc.http.Request`): The request to patch.
            options (:class:`nyawc.Options`): The options to patch the request with.
            parent_queue_item (:class:`nyawc.QueueItem`): The parent queue item object (request/response pair) if exists.