Return the result of a GET request to `endpoint` on boatd
490914
def get(self, endpoint):
        ''''''
        json_body = urlopen(self.url(endpoint)).read().decode('utf-8')
        return json.loads(json_body)
290823
def json_request(endpoint, verb='GET', session_options=None, **options):
    
    req = functools.partial(_request, endpoint, verb, session_options,
                            json=True, **options)
    return _run_in_fresh_loop(req)
593822
def get(cls, api=None, **kwargs):
        
        api = api if api else cls._API
        extra = {
            'resource': cls.__name__,
            'query': {}
        }
        logger.info('Getting resources', extra=extra)
        endpoints = api.get(url=cls._URL['get']).json()
        return Endpoints(api=api, **endpoints)
1141511
def _get_data(self, url, accept=None):
        
        if self.parsed_endpoint.scheme == 'https':
            conn = httplib.HTTPSConnection(self.parsed_endpoint.netloc)
        else:
            conn = httplib.HTTPConnection(self.parsed_endpoint.netloc)
        head = {
            "User-Agent": USER_AGENT,
            API_TOKEN_HEADER_NAME: self.api_token,
        }
        if self.api_version in ['0.1', '0.01a']:
            head[API_VERSION_HEADER_NAME] = self.api_version
        if accept:
            head['Accept'] = accept
        conn.request("GET", url, "", head)
        resp = conn.getresponse()
        self._handle_response_errors('GET', url, resp)
        content_type = resp.getheader('content-type')
        if 'application/json' in content_type:
            return json.loads(resp.read())
        return resp.read()
230334
def _get_results_from_api(identifiers, endpoints, api_key, api_secret):
    """"""

    if api_key is not None and api_secret is not None:
        client = housecanary.ApiClient(api_key, api_secret)
    else:
        client = housecanary.ApiClient()

    wrapper = getattr(client, endpoints[0].split('/')[0])

    if len(endpoints) > 1:
        # use component_mget to request multiple endpoints in one call
        return wrapper.component_mget(identifiers, endpoints)
    else:
        return wrapper.fetch_identifier_component(endpoints[0], identifiers)
1211657
def do_GET(self):
        
        # Check that the path is legal
        if not self.is_rpc_path_valid():
            self.report_404()
            return

        response = self.server.generate_html_documentation().encode('utf-8')
        self.send_response(200)
        self.send_header("Content-type", "text/html")
        self.send_header("Content-length", str(len(response)))
        self.end_headers()
        self.wfile.write(response)
667486
async function getRepos(token, endpoint) {
  logger.debug(`getRepos(${endpoint})`);
  const opts = hostRules.find({ platform }, { token, endpoint });
  // istanbul ignore next
  if (!opts.token) {
    throw new Error('No token found for getRepos');
  }
  hostRules.update({ ...opts, platform, default: true });
  try {
    const repos = await utils.accumulateValues(
      `./rest/api/1.0/repos?permission=REPO_WRITE&state=AVAILABLE`
    );
    const result = repos.map(r => `${r.project.key.toLowerCase()}/${r.slug}`);
    logger.debug({ result }, 'result of getRepos()');
    return result;
  } catch (err) /* istanbul ignore next */ {
    logger.error({ err }, `bitbucket getRepos error`);
    throw err;
  }
}
610329
def endpoint_get(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.get_endpoint(**kwargs)
1167200
public Response get(String endpoint) {
        return call(Method.GET, endpoint, null, null);
    }
248330
def _get(app, endpoint, id=None, auth_required=False, **kwargs):
    '''
    
    '''
    nb = _nb_obj(auth_required=auth_required)
    if id:
        item = getattr(getattr(nb, app), endpoint).get(id)
    else:
        kwargs = __utils__['args.clean_kwargs'](**kwargs)
        item = getattr(getattr(nb, app), endpoint).get(**kwargs)
    return item
1207936
def get_endpoint(endpoint_id)
      endpoint = EndPoint.new(@client.make_request(:get, @client.concat_user_path("#{DOMAIN_PATH}/#{id}/endpoints/#{endpoint_id}"))[0],
                           @client)
      endpoint.domain_id = id
      endpoint
    end
1282278
def _get(self, *args, **kwargs):
        
        return self._request(requests.get, *args, **kwargs)
1214018
def get(self, endpoint, params=None, version='1.1'):
        """"""
        return self.request(endpoint, params=params, version=version)
864606
def fetch(self, endpoint, data = None):
        
        payload = {
            "lastServerChangeId": "-1",
            "csrf": self.__csrf,
            "apiClient": "WEB"
        }
        if data is not None:
            payload.update(data)

        return self.post(endpoint, payload)
334557
def make_inaturalist_api_get_call(endpoint: str, params: Dict, **kwargs) -> requests.Response:
    
    headers = {'Accept': 'application/json'}

    response = requests.get(urljoin(INAT_NODE_API_BASE_URL, endpoint), params, headers=headers, **kwargs)
    return response
549574
def handle_get_request(self, environ, start_response):
        """"""
        connections = [
            s.strip()
            for s in environ.get('HTTP_CONNECTION', '').lower().split(',')]
        transport = environ.get('HTTP_UPGRADE', '').lower()
        if 'upgrade' in connections and transport in self.upgrade_protocols:
            self.server.logger.info('%s: Received request to upgrade to %s',
                                    self.sid, transport)
            return getattr(self, '_upgrade_' + transport)(environ,
                                                          start_response)
        try:
            packets = self.poll()
        except exceptions.QueueEmpty:
            exc = sys.exc_info()
            self.close(wait=False)
            six.reraise(*exc)
        return packets
458168
def fetch(params, endpoint_path = 'previews')
      options = prepare_request(params)
      response = default_connection(BASE_URL, params.debug)
                   .post do |req|
                    req.url("/v2/#{endpoint_path}/")
                     req.body = JSON.generate(options)
                   end

      parse(response.body)
    end