@utilities.debug 
    def make_request(self,value="",case=None,rval=None,debug=False):
        '''
        Make a request. The value specified will be compiled/rendered into all Query objects in the
        request. If case and rval are specified the response will be appended to the list of values 
        for the specified case. if return_case is True then we return the case rather than the rval.
        this is only really used for recursing by _test in the case of an error. Depth keeps track of 
        recursion depth when we make multiple requests after a failure. 
        '''

        new_request_kwargs = copy(self.request_kwargs)

        # keep track of which keys were dynamic so we know which ones to print after we make the request.
        # we do this so hooks can process the requests before we print them for debugging...
        keys_to_debug = []

        #iterate over the request_kwargs and compile any elements that are query objects.
        for k in [e for e in new_request_kwargs if isinstance(new_request_kwargs[e],Query)]:
            opts = new_request_kwargs[k].get_options()
            for opt in opts:
                opts[opt] = value
            new_request_kwargs[k].set_options(opts)
            new_request_kwargs[k] = new_request_kwargs[k].render()

            keys_to_debug.append(k)

        response = self.session.request(**new_request_kwargs)

        if debug:
            for k in keys_to_debug:
                print "Injecting into '%s' parameter" % k
                print "It looks like this: %s" % getattr(response.request,k)

        #glet = grequests.send(new_request)
        #glet.join()
        #if not glet.get() and type(new_request.response.error) is requests.exceptions.ConnectionError:
        #    raise utilities.SendRequestFailed("looks like you have a problem")

        #see if the response was 'true'
        if case is None:
            case = self._test(response)
            rval = self.cases[case]['rval']

        if debug and case:
            print "we will be treating this as a '%s' response" % case
            print "for the sample requests, the response's '%s' were the following :\n\t%s" % (self.comparison_attr,self.cases[case]['values'])
            print "\n"


        self._process_response(case,rval,response)

        return self.cases[case]['rval']
dataset/ETHPy150Open Neohapsis/bbqsql/bbqsql/lib/requester.py/Requester.make_request/original