Fetch the request

        Coroutine.
775118
def _fetch(self, request: Request, is_file: bool):
        '''
        '''
        _logger.info(_('Fetching ‘{url}’.'), url=request.url)

        self._item_session.request = request
        response = None

        try:
            with self._processor.ftp_client.session() as session:
                if is_file:
                    response = yield from session.start(request)
                else:
                    response = yield from session.start_listing(request)

                self._item_session.response = response

                action = self._result_rule.handle_pre_response(
                    self._item_session
                )

                if action in (Actions.RETRY, Actions.FINISH):
                    raise HookPreResponseBreak()

                self._file_writer_session.process_response(response)

                if not response.body:
                    response.body = Body(
                        directory=self._item_session.app_session.root_path,
                        hint='resp_cb')

                duration_timeout = self._fetch_rule.duration_timeout

                if is_file:
                    yield from session.download(
                        response.body, duration_timeout=duration_timeout)
                else:
                    yield from session.download_listing(
                        response.body, duration_timeout=duration_timeout)

        except HookPreResponseBreak:
            if response:
                response.body.close()

        except REMOTE_ERRORS as error:
            self._log_error(request, error)

            self._result_rule.handle_error(self._item_session, error)

            wait_time = self._result_rule.get_wait_time(
                self._item_session, error=error
            )

            if response:
                response.body.close()

            return wait_time
        else:
            self._log_response(request, response)
            self._handle_response(request, response)

            wait_time = self._result_rule.get_wait_time(
                self._item_session
            )

            if is_file and \
                    self._processor.fetch_params.preserve_permissions and \
                    hasattr(response.body, 'name'):
                yield from self._apply_unix_permissions(request, response)

            response.body.close()

            return wait_time
1329013
def fetch(self):
        
        api = self.doapi_manager
        return api._droplet(api.request(self.url)["droplet"])
141698
def _get(self, url, params={}):
        """"""
        r = requests.get(self._api_prefix + url,
            params=params,
            headers=self.headers,
            auth=self.auth,
        )
        return self._action(r)
1362498
def sync_fetch(request, method, default_headers=None,
               httpclient=None, **kwargs):
    
    updated_request = make_request(request, method, default_headers, **kwargs)
    if not httpclient:
        httpclient = HTTPClient()
    rsp = httpclient.fetch(updated_request)
    return parse_response(rsp)
366863
def fetch(self):
        
        api = self.doapi_manager
        return api._tag(api.request(self.url)["tag"])
206345
def fetch(self):
        
        self.limit.set_request_args(self.kwargs)
        data = self.connection.call(*self.args, **self.kwargs)
        self.limit.post_fetch(data)
        self.last_evaluated_key = data.get('LastEvaluatedKey')
        if self.last_evaluated_key is None:
            self.kwargs.pop('ExclusiveStartKey', None)
        else:
            self.kwargs['ExclusiveStartKey'] = self.last_evaluated_key
        self._update_capacity(data)
        if 'consumed_capacity' in data:
            self.consumed_capacity += data['consumed_capacity']
        for raw_item in data['Items']:
            item = self.connection.dynamizer.decode_keys(raw_item)
            if self.limit.accept(item):
                yield item
1256100
def _prepare_fetch(self, request: Request, response: Response):
        '''
        '''
        self._request = request
        self._response = response

        yield from self._init_stream()

        connection_closed = self._control_connection.closed()

        if connection_closed:
            self._login_table.pop(self._control_connection, None)
            yield from self._control_stream.reconnect()

        request.address = self._control_connection.address

        connection_reused = not connection_closed
        self.event_dispatcher.notify(self.Event.begin_control, request, connection_reused=connection_reused)

        if connection_closed:
            yield from self._commander.read_welcome_message()

        yield from self._log_in()

        self._response.request = request
805289
def fetch_data_async(blob, start_index, end_index, **options):
  """"""
  if isinstance(blob, BlobInfo):
    blob = blob.key()
  rpc = blobstore.create_rpc(**options)
  rpc = blobstore.fetch_data_async(blob, start_index, end_index, rpc=rpc)
  result = yield rpc
  raise tasklets.Return(result)
780532
def execute(self, fn, *args, **kwargs):
        """"""
        if self.in_executor_context():
            corofn = asyncio.coroutine(lambda: fn(*args, **kwargs))
            return corofn()
        future = self.submit(fn, *args, **kwargs)
        return future.result()
221777
def _fetch(self):
        """"""
        if 'uri' in self._meta_data:
            error = "There was an attempt to assign a new uri to this "\
                    "resource, the _meta_data['uri'] is %s and it should"\
                    " not be changed." % (self._meta_data['uri'])
            raise URICreationCollision(error)
        # Make convenience variable with short names for this method.
        _create_uri = self._meta_data['container']._meta_data['uri']
        session = self._meta_data['bigip']._meta_data['icr_session']
        # Invoke the REST operation on the device.
        response = session.post(_create_uri, json={})
        # Make new instance of self
        return self._produce_instance(response)
627522
def fetch(self, resource_data=None):
        """"""
        if not self._populated:
            params = {
                "Page"      : self.page,
                "PageSize"  : self.page_size,
            }

            params.update(self._filters)

            if not resource_data:
                self._resource_data = self._client._get(self._url + ".json", params)
            else:
                self._resource_data = resource_data

            self.total = self._resource_data["total"]
            self._page_start = self._resource_data["start"]
            self._page_end = self._resource_data["end"]

            self._populated = True
220318
def _fetch(self, request):
        
        client = self.client

        #: Dispatch the async call
        call = Call(__id__=client.newCall(request.request))
        call.enqueue(request.handler)

        #: Save the call reference
        request.call = call
1250095
def get(self, resource, params=None, **kwargs):
        """"""
        return self.request('GET', resource, params=params, **kwargs)
187137
def maybe_coroutine(obj):
    
    if six.PY3 and asyncio.iscoroutine(obj):
        return defer.ensureDeferred(obj)
    return obj
1181198
def fetch(self, query_id, start_over, fetch_size):
    
    self.send_fetch(query_id, start_over, fetch_size)
    return self.recv_fetch()
568870
public function fetch() {

        $response = $this->get_response();
        $this->validate_response($response);
        $this->store_response($response);

        // We need to reset plugin manager's caches - the currently existing
        // singleton is not aware of eventually available updates we just fetched.
        \core_plugin_manager::reset_caches();
    }
1253087
def _async_requests(urls):
    
    session = FuturesSession(max_workers=30)
    futures = [
        session.get(url)
        for url in urls
    ]
    return [ future.result() for future in futures ]