aiohttp wrapper for GET
171971
async def retry_get(config, url, *args, **kwargs):
    
    return await _retry_do(config.session.get, url, *args,
                           **_make_headers(config, kwargs))
296872
def _get_request(self, url, params=None, **kwargs):
        
        '''  '''
        
    # construct request kwargs
        request_kwargs = {
            'method': 'GET',
            'url': url,
            'params': params
        }
        for key, value in kwargs.items():
            request_kwargs[key] = value

    # send request and handle response
        return self._request(**request_kwargs)
1222143
def __Get(self, path, request, headers):
        
        return synchronized_request.SynchronizedRequest(self,
                                                        request,
                                                        self._global_endpoint_manager,
                                                        self.connection_policy,
                                                        self._requests_session,
                                                        'GET',
                                                        path,
                                                        None,
                                                        None,
                                                        headers)
953187
async def makeHttpRequest(method, url, payload, headers, retries=utils.MAX_RETRIES, session=None):
    
    retry = -1
    response = None
    implicit = False
    if session is None:
        implicit = True
        session = aiohttp.ClientSession()

    def cleanup():
        if implicit:
            loop = asyncio.get_event_loop()
            loop.run_until_complete(session.close())

    try:
        while True:
            retry += 1
            # if this isn't the first retry then we sleep
            if retry > 0:
                snooze = float(retry * retry) / 10.0
                log.info('Sleeping %0.2f seconds for exponential backoff', snooze)
                await asyncio.sleep(snooze)

            # Seek payload to start, if it is a file
            if hasattr(payload, 'seek'):
                payload.seek(0)

            log.debug('Making attempt %d', retry)
            try:
                with async_timeout.timeout(60):
                    response = await makeSingleHttpRequest(method, url, payload, headers, session)
            except aiohttp.ClientError as rerr:
                if retry < retries:
                    log.warn('Retrying because of: %s' % rerr)
                    continue
                # raise a connection exception
                raise rerr
            except ValueError as rerr:
                log.warn('ValueError from aiohttp: redirect to non-http or https')
                raise rerr
            except RuntimeError as rerr:
                log.warn('RuntimeError from aiohttp: session closed')
                raise rerr
            # Handle non 2xx status code and retry if possible
            status = response.status
            if 500 <= status and status < 600 and retry < retries:
                if retry < retries:
                    log.warn('Retrying because of: %d status' % status)
                    continue
                else:
                    raise exceptions.TaskclusterRestFailure("Unknown Server Error", superExc=None)
            return response
    finally:
        cleanup()
    # This code-path should be unreachable
    assert False, "Error from last retry should have been raised!"
1188663
def get(self, path, query=None, redirects=True):
        
        return self.request('GET', path, query, None, redirects)
320123
def get(self, request, bot_id, id, format=None):
        
        return super(UrlParameterList, self).get(request, bot_id, id, format)
1254561
def get(self, endpoint: str, **kwargs) -> dict:
        """"""

        return self._request('GET', endpoint, **kwargs)
1206358
function get(req, res) {
  var ptn = '' + req.args[0]
    , keys = this.pattern.filter(ptn, this.conf.getKeys())
    , list = []
    , i
    , k;
  for(i = 0;i < keys.length;i++) {
    k = keys[i];
    list.push(k, '' + this.conf.get(k));
  }
  res.send(null, list);
}
1321392
def request(uri, method, data, token=''):
    
    socket.setdefaulttimeout(__timeout__)

    obj = urllib.build_opener(urllib.HTTPHandler)

    # encoding json
    encoded = json.JSONEncoder(object).encode(data)

    # encoding utf8
    data_utf8 = encoded.encode('utf-8')
    req = urllib.Request(uri, data=data_utf8)

    # When encoded(=data) is False, retrieve data as GET method.
    if encoded:
        req.add_header('Content-Type', 'application/json')

    if token:
        req.add_header('x-authentication-token', token)

    req.get_method = lambda: method

    try:
        res = obj.open(req)
        return res

    except urllib.URLError as e:
        sys.stderr.write("ERROR: %s\n" % e)
        exit(1)

    except urllib.HTTPError as e:
        sys.stderr.write("ERROR: %s\n" % e)
        exit(1)
69011
def get(self, uri, disable_proxy=False, stream=False):
        """"""
        response = requests.get(
            uri,
            headers=self.headers,
            allow_redirects=True,
            cookies={},
            stream=stream,
            proxies=self.proxy if not disable_proxy else False
        )

        if response.status_code in _PERMITTED_STATUS_CODES:
            self.response_headers = response.headers
            return response.content if not stream else response.iter_content()
        else:
            raise requests.exceptions.HTTPError(
                "HTTP response did not have a permitted status code."
            )
1177877
def get(self, param=None, must=[APIKEY]):
        '''
        '''
        param = {} if param is None else param
        r = self.verify_param(param, must)
        if not r.is_succ():
            return r
        handle = CommonResultHandler(lambda rsp: {VERSION_V1:rsp.get(USER), VERSION_V2:rsp}[self.version()])
        return self.path('get.json').post(param, handle, r)
467574
def do_GET(self):
        # check here request header to identify the type of req, if http or ws
        # if this is a ws req, instance a ws handler, add it to App's ws list, return
        if "Upgrade" in self.headers:
            if self.headers['Upgrade'] == 'websocket':
                #passing arguments to websocket handler, otherwise it will lost the last message, 
                # and will be unable to handshake
                ws = WebSocketsHandler(self.headers, self.request, self.client_address, self.server)
                return

        """"""
        do_process = False
        if self.server.auth is None:
            do_process = True
        else:
            if not ('Authorization' in self.headers) or self.headers['Authorization'] is None:
                self._log.info("Authenticating")
                self.do_AUTHHEAD()
                self.wfile.write(encode_text('no auth header received'))
            elif self.headers['Authorization'] == 'Basic ' + self.server.auth.decode():
                do_process = True
            else:
                self.do_AUTHHEAD()
                self.wfile.write(encode_text(self.headers['Authorization']))
                self.wfile.write(encode_text('not authenticated'))

        if do_process:
            path = str(unquote(self.path))
            # noinspection PyBroadException
            try:
                self._instance()
                # build the page (call main()) in user code, if not built yet
                with self.update_lock:
                    # build the root page once if necessary
                    if not 'root' in self.page.children['body'].children.keys():
                        self._log.info('built UI (path=%s)' % path)
                        self.set_root_widget(self.main(*self.server.userdata))
                self._process_all(path)
            except:
                self._log.error('error processing GET request', exc_info=True)
929551
def _get(self, url, params=None, headers=None):
        """"""
        url = self.clean_url(url)
        response = requests.get(url, params=params, verify=self.verify,
                                timeout=self.timeout, headers=headers)
        return response
810255
def _get(self, *args, **kwargs):
        

        if 'timeout' not in kwargs:
            kwargs['timeout'] = self.timeout

        req = self.session.get(*args, **kwargs)
        return req
947025
def get(self, request, bot_id, id, format=None):
        
        return super(HeaderParameterList, self).get(request, bot_id, id, format)
770068
def getheader(self, name, default=None):
        """"""
        return self.aiohttp_response.headers.get(name, default)
102532
def fetch(cls, id, api_key=None, endpoint=None, add_headers=None,
              **kwargs):
        
        if endpoint is None:
            endpoint = cls.get_endpoint()

        inst = cls(api_key=api_key)
        parse_key = cls.sanitize_ep(endpoint).split("/")[-1]
        endpoint = '/'.join((endpoint, id))
        data = cls._parse(inst.request('GET',
                                       endpoint=endpoint,
                                       add_headers=add_headers,
                                       query_params=kwargs),
                          key=parse_key)
        inst._set(data)
        return inst