Get the data we just requested.
        Shouldn't happen with newer servers, since they use
        getheaders/headers followed by getdata/blocks
        (older peers use getblocks/inv/getdata/inv exchanges)
173097
def handle_inv(self, message_header, inv_packet ):
        
        log.debug("handle inv of %s item(s)" % len(inv_packet.inventory))

        reply_inv = []

        for inv_info in inv_packet.inventory:
            inv_hash = "%064x" % inv_info.inv_hash
            if inv_info.inv_type == INVENTORY_TYPE["MSG_BLOCK"]:
                # only ask for the block if we need it
                if inv_hash in self.block_info.keys() and not self.block_info[inv_hash]['handled']:
                    log.debug("Will request block %s" % inv_hash)
                    reply_inv.append( inv_info )
                    inv_hash = None


        if len(reply_inv) > 0:
            getdata = GetData()
            getdata.inventory = reply_inv
            log.debug("send GetData in reply to Inv for %s item(s)" % len(reply_inv))
            self.send_message(getdata)

        else:
            if self.have_all_block_data():
                self.loop_exit()
726492
def getBumperData(self):
        '''
        

        '''
        self.lock.acquire()
        t = current_milli_time()
        if (t - self.time) > 500:
            self.data.state = 0
        bump = self.data
        self.lock.release()
        
        return bump
480021
def _retrieve(self, map):
        
        self._conn.request('GET', "cache_object://%s/%s" % (self._host, map), 
                           None, self._httpHeaders)
        rp = self._conn.getresponse()
        if rp.status == 200:
            data = rp.read()
            return data
        else:
            raise Exception("Retrieval of stats from Squid Proxy Server"
                            "on host %s and port %s failed.\n"
                            "HTTP - Status: %s    Reason: %s" 
                            % (self._host, self._port, rp.status, rp.reason))
364290
def get_load(jid):
    '''
    
    '''
    serv = _get_serv(ret=None)
    sql = "select load from jids where jid = '{0}'".format(jid)

    log.debug(">> Now in get_load %s", jid)
    data = serv.query(sql)
    log.debug(">> Now Data: %s", data)
    if data:
        return data
    return {}
259993
def retrieve_data(self):
        
        # shortcuts for readability
        url = self.config.get('url')
        timeout = float(self.config.get('timeout', 10))
        # perform HTTP request and store content
        self.data = requests.get(url, verify=self.verify_ssl, timeout=timeout).content
1259027
public void getDataFromClient(HttpRequestBase httpget, OutputStream streamOut) throws ClientProtocolException, IOException
    {
    	HttpClient httpclient = new DefaultHttpClient();
    	     	 
    	 // Execute the request
    	 HttpResponse response = httpclient.execute(httpget);
    	 
    	 // Get the response entity
    	 HttpEntity entity = response.getEntity();
    	 
    	 if (entity != null)
    	 {
	    	 InputStream instream = entity.getContent();
	    	    	 
		     ProxyServlet.transferURLStream(instream, streamOut);
	
	         // Closing the input stream will trigger connection release
	         instream.close();
	    	         	     
	         // There is probably a less resource intensive way to do this.
	         httpclient.getConnectionManager().shutdown();
    	 }
    }
675451
def get_headers(data, extra_headers=None):
    '''
    
    '''
    response_headers = {
        'Content-Length': str(len(data)),
    }

    if extra_headers:
        response_headers.update(extra_headers)

    return list(response_headers.items())
1119955
def retrieve(self):
        
        response = self.request(E.retrieveResellerRequest())
        return Reseller(response.data)
1362651
def get_data(self, endpoint="privacy"):

        """"""

        if endpoint == "privacy":
            response = self._req('/data/privacy')
        elif endpoint == "submission":
            response = self._req('/data/submission')
        elif endpoint == "tos":
            response = self._req('/data/tos')
        else:
            raise DeviantartError("Unknown endpoint.")

        return response['text']
516015
def get(self, timeout=None, block=True):
        
        return self.get_event(timeout, block).data
1205312
def get_server_info(self, format=None):
        
        parameters = {}
        if format is not None:
            parameters['format'] = format
        url = self.create_request_url(self.interface, 'GetServerInfo', 1,
            parameters)
        data = self.retrieve_request(url)
        return self.return_data(data, format=format)
361827
function getSessionBlockchainID() {

   let userData = getUserData();
   assert(userData);
   assert(userData.coreSessionToken);

   const session = jsontokens.decodeToken(userData.coreSessionToken).payload;

   return getBlockchainIDFromSessionOrDefault(session);
}
178075
def get_clients(self, limit=None, offset=None):
        
        data = {}
        if limit:
            data['limit'] = limit
        if offset:
            data['offset'] = offset
        result = self._request('GET', '/clients', data=json.dumps(data))
        return result.json()
1340877
def getRequest
      m = Request.new
      m.pieceIndex = @pieceIndex
      m.blockOffset = @offset
      m.blockLength = @length
      m
    end
1097912
private HostThreadData getData() {
        Thread thread = Thread.currentThread();
        if (!(thread instanceof XnioIoThread)) {
            throw UndertowMessages.MESSAGES.canOnlyBeCalledByIoThread();
        }
        XnioIoThread ioThread = (XnioIoThread) thread;
        HostThreadData data = hostThreadData.get(ioThread);
        if (data != null) {
            return data;
        }
        data = new HostThreadData();
        HostThreadData existing = hostThreadData.putIfAbsent(ioThread, data);
        if (existing != null) {
            return existing;
        }
        return data;
    }
432730
def get_chunked_content(self, chunksize=4096):
        ''''''

        # get the datastream dissemination, but return the actual http response
        r = self.obj.api.getDatastreamDissemination(self.obj.pid, self.id,
            stream=True,  asOfDateTime=self.as_of_date)
        # read and yield the response in chunks
        for chunk in r.iter_content(chunksize):
            yield chunk
1063955
def recv_data(self):
        
        data, addr = self.sock.recvfrom(self.packetsize)
        matrix = map(ord, data.strip())
        if len(matrix) == self.packetsize:
            self.matrix = matrix[:-4]