def GetTransaction(self, use_cache, url, method=None, data=None):
        criteria = {'url': url.strip()}
        if method is not None:
            criteria['method'] = method
        # Must clean-up data to ensure match is found.
        if data is not None:
            criteria['data'] = self.DerivePOSTToStr(data)
        # Visit URL if not already visited.
        if (not use_cache or not self.transaction.IsTransactionAlreadyAdded(criteria)):
            if method in ['', 'GET', 'POST', 'HEAD', 'TRACE', 'OPTIONS']:
                return self.Request(url, method, data)
            elif method == 'DEBUG':
                return self.DEBUG(url)
            elif method == 'PUT':
                return self.PUT(url, data)
        else:  # Retrieve from DB = faster.
            # Important since there is no transaction ID with transactions
            # objects created by Requester.
            return self.transaction.GetFirst(criteria)
dataset/ETHPy150Open owtf/owtf/framework/http/requester.py/Requester.GetTransaction/original