Return a dictionary of links to related resources that should be
        included in the *Link* header of an HTTP response.

        :rtype: dict
181928
def links(self):
        
        link_dict = {'self': self.resource_uri()}
        for relationship in inspect(  # pylint: disable=maybe-no-member
                self.__class__).relationships:
            if 'collection' not in relationship.key:
                instance = getattr(self, relationship.key)
                if instance:
                    link_dict[str(relationship.key)] = instance.resource_uri()
        return link_dict
179230
def jsonify(resource):
    

    response = flask.jsonify(resource.to_dict())
    response = add_link_headers(response, resource.links())
    return response
215215
private Header[] getLinkHeaders(final String resourceUri) throws IOException {
        final HttpHead request = new HttpHead(resourceUri);
        final HttpResponse response = httpClient.execute(request);
        LOGGER.debug("Got: " + response.getStatusLine().getStatusCode() + " for HEAD " + resourceUri);
        return response.getHeaders("Link");
    }
1121264
def header(self):
        ''' 
        '''
        if self._header is None:
            self._header = HeaderDict()
            for key, value in self.environ.iteritems():
                if key.startswith('HTTP_'):
                    key = key[5:].replace('_','-').title()
                    self._header[key] = value
        return self._header
708884
def webhooks(self):
        
        if self._webhooks is None:
            self._webhooks = WebhookList(self)
        return self._webhooks
1235382
def _get_headers(environ):
    # type: (Dict[str, str]) -> Iterator[Tuple[str, str]]
    
    for key, value in environ.items():
        key = str(key)
        if key.startswith("HTTP_") and key not in (
            "HTTP_CONTENT_TYPE",
            "HTTP_CONTENT_LENGTH",
        ):
            yield key[5:].replace("_", "-").title(), value
        elif key in ("CONTENT_TYPE", "CONTENT_LENGTH"):
            yield key.replace("_", "-").title(), value
50045
def process_links(self, links):
        
        links_list = []
        for link in links:
            if os.path.splitext(link)[1][1:].strip().lower() in self.format_list:
                links_list.append(link)
        return links_list
1028433
def href(self):
        
        url = self.session.base_url + str(self.path)
        if self.path.is_collection and not self.path.is_root:
            return url + 's'
        return url
174319
def links(self):
        
        dlinks = {}
        for key, value in self.__dict__.items():
            if isinstance(value, dict) and value['link']:
                dlinks[key] = value['link']
        return dlinks
201774
def getHeaders(self):
        '''
        
        '''
        items = self.data
        headers = {}
        for item in items:
            if len(item) > 0 and self._judeNOtIn(item, ['curl', 'GET', 'Cookie', 'cookie']):
                sp = item.split(':')
                headers[sp[0]] = sp[1]
        return headers
55185
def getHeaders(self):
        
        headers = self._impl.getHeaders()
        return tuple(
            headers.getIndex(i) for i in range(self._impl.getNumCols())
        )
703364
def links(self):
        """"""
        ret = []
        linkheader = self.getheader('link')
        if not linkheader:
            return ret
        for i in linkheader.split(','):
            try:
                url, params = i.split(';', 1)
            except ValueError:
                url, params = i, ''
            link = {}
            link['url'] = url.strip('''<> '"''')
            for param in params.split(';'):
                try:
                    k, v = param.split('=')
                except ValueError:
                    break
                link[k.strip(''' '"''')] = v.strip(''' '"''')
            ret.append(link)
        return ret
871731
def headers(self):
        '''  '''
        self.__dict__['headers'] = hdict = HeaderDict()
        hdict.dict = self._headers
        return hdict
1152968
def get_google_links(limit, params, headers):
	
	links = []
	for start_index in range(0, limit, 10):
		params['start'] = start_index
		resp = s.get("https://www.google.com/search", params = params, headers = headers)
		page_links = scrape_links(resp.content, engine = 'g')
		links.extend(page_links)
	return links[:limit]
884762
def linkfetch(self):
        "
        request, handle = self.open()
        self._add_headers(request)
        if handle:
            self._get_crawled_urls(handle, request)
552315
async def get_resources(self):
        
        facade = client.ResourcesFacade.from_connection(self.connection)
        response = await facade.ListResources([client.Entity(self.tag)])

        resources = dict()
        for result in response.results:
            for resource in result.charm_store_resources or []:
                resources[resource.name] = resource
            for resource in result.resources or []:
                if resource.charmresource:
                    resource = resource.charmresource
                    resources[resource.name] = resource
        return resources
35376
def parse_header_links(self):
        """"""
        for linktype, linkinfo in self.url_connection.links.items():
            url = linkinfo["url"]
            name = u"Link: header %s" % linktype
            self.add_url(url, name=name)
        if 'Refresh' in self.headers:
            from ..htmlutil.linkparse import refresh_re
            value = self.headers['Refresh'].strip()
            mo = refresh_re.match(value)
            if mo:
                url = unicode_safe(mo.group("url"))
                name = u"Refresh: header"
                self.add_url(url, name=name)
        if 'Content-Location' in self.headers:
            url = self.headers['Content-Location'].strip()
            name = u"Content-Location: header"
            self.add_url(url, name=name)