Example #1
0
 def fetch(self, request, callback, *args, **kwargs):
     method, url = _request_info(request)
     recording.pre_call_hook('HTTP', method, url, None)
     def wrapper(request, callback, response, *args):
         recording.post_call_hook('HTTP', method, url, None)
         callback(response)
     super(AsyncHTTPClient, self).fetch(
       request,
       functools.partial(wrapper, request, callback),
       *args, **kwargs)
Example #2
0
    def fetch(self, request, callback, *args, **kwargs):
        method, url = _request_info(request)
        recording.pre_call_hook('HTTP', method, url, None)

        def wrapper(request, callback, response, *args):
            recording.post_call_hook('HTTP', method, url, None)
            callback(response)

        super(AsyncHTTPClient,
              self).fetch(request, functools.partial(wrapper, request,
                                                     callback), *args,
                          **kwargs)
Example #3
0
 def fetch(self, request, *args, **kwargs):
     method, url = _request_info(request)
     recording.pre_call_hook('HTTP', method, url, None)
     response = super(HTTPClient, self).fetch(request, *args, **kwargs)
     recording.post_call_hook('HTTP', method, url, None)
     return response
Example #4
0
 def fetch(self, request, *args, **kwargs):
     method, url = _request_info(request)
     recording.pre_call_hook('HTTP', method, url, None)
     response = super(HTTPClient, self).fetch(request, *args, **kwargs)
     recording.post_call_hook('HTTP', method, url, None)
     return response