// RequestURI returns the request URI of the message.
332408
func (m *Message) RequestURI() string {
	if m.isV1API() {
		return fmt.Sprintf("/api/v1/%s", m.Name)
	}

	return fmt.Sprintf("/%s/%s", m.UPID.ID, m.Name)
}
589584
func (ctx *context) RequestPath(escape bool) string {
	if escape {
		return DecodeQuery(ctx.request.URL.EscapedPath())
	}
	return ctx.request.URL.Path // RawPath returns empty, requesturi can be used instead also.
}
663052
func (k RRSetKey) NotificationsQueryURI(query string, offset int) string {
	uri := k.NotificationsURI()
	if query != "" {
		uri = fmt.Sprintf("%s?sort=NAME&query=%s&offset=%d", uri, query, offset)
	} else {
		uri = fmt.Sprintf("%s?offset=%d", uri, offset)
	}
	return uri
}
162116
func (s Session) AddURI(uri string) Session {
	return s.appendString(TypeURI, uri)
}
97336
func ParseAndValidateURIs(uriList string) (res []*url.URL, err error) {
	if len(uriList) > 0 {
		uris := strings.Split(uriList, ",")
		for _, uri := range uris {
			parsedURI, err := url.Parse(uri)
			if err != nil {
				parsedURI = nil
			}
			if parsedURI == nil {
				return nil, fmt.Errorf("Invalid URI: %s", uri)
			}
			if !parsedURI.IsAbs() {
				return nil, fmt.Errorf("Invalid URI: %s", uri)
			}
			res = append(res, parsedURI)
		}
	}
	return
}
1211505
func (s *UpdateAuthorizerOutput) SetAuthorizerUri(v string) *UpdateAuthorizerOutput {
	s.AuthorizerUri = &v
	return s
}
819350
func (s *NetlinkSocket) RequestMulti(req *NlMsgBuilder, consumer func(*NlMsgParser) error) error {
	seq, err := s.send(req)
	if err != nil {
		return err
	}

	return s.Receive(func(msg *NlMsgParser) (bool, error) {
		relevant, err := msg.checkResponseHeader(s.PortId(), seq)
		if !relevant || err != nil {
			return false, err
		}

		if msg.NlMsghdr().Type == syscall.NLMSG_DONE {
			return true, processNlMsgDone(msg)
		}

		err = consumer(msg)
		if err != nil {
			return true, err
		}

		return false, nil
	})
}
438363
func baseURI(req *http.Request) string {
	scheme := strings.ToLower(req.URL.Scheme)
	host := strings.ToLower(req.URL.Host)
	if hostPort := strings.Split(host, ":"); len(hostPort) == 2 && (hostPort[1] == "80" || hostPort[1] == "443") {
		host = hostPort[0]
	}
	// TODO: use req.URL.EscapedPath() once Go 1.5 is more generally adopted
	// For now, hacky workaround accomplishes the same internal escaping mode
	// escape(u.Path, encodePath) for proper compliance with the OAuth1 spec.
	path := req.URL.Path
	if path != "" {
		path = strings.Split(req.URL.RequestURI(), "?")[0]
	}
	return fmt.Sprintf("%v://%v%v", scheme, host, path)
}
414230
func RequestMessage(level string, r *http.Request, msg string) {
	std.RequestMessage(level, r, msg)
}
253752
func ParseSessionsURI(in string) (*url.URL, error) {
	if in == "" {
		return nil, trace.BadParameter("uri is empty")
	}
	u, err := url.Parse(in)
	if err != nil {
		return nil, trace.BadParameter("failed to parse URI %q: %v", in, err)
	}
	if u.Scheme == "" {
		u.Scheme = teleport.SchemeFile
	}
	return u, nil
}
1058888
func RequestedURL(r *http.Request) (ret *url.URL) {
	ret = CopyURL(r.URL)
	ret.Host = r.Host
	ret.Scheme = OriginatingProtocol(r)
	return
}
397955
func (c *logCache) LogURIs() []string {
	c.RLock()
	defer c.RUnlock()
	var uris []string
	for _, l := range c.logs {
		uris = append(uris, l.uri)
	}
	return uris
}
623829
func WithURI(uri string) ClientOptionFunc {
	return func(c *Client) error {
		_, err := url.Parse(c.uri)
		if err != nil {
			return client.InvalidURIError{URI: uri, Err: err.Error()}
		}
		c.uri = uri
		return nil
	}
}
1339633
func (p EventKey) URI() string {
	return fmt.Sprintf("%s/%s", p.RRSetKey().EventsURI(), p.GUID)
}
581689
func (s *Integration) SetUri(v string) *Integration {
	s.Uri = &v
	return s
}
645075
func (e *Echo) URI(handler HandlerFunc, params ...interface{}) string {
	name := handlerName(handler)
	return e.Reverse(name, params...)
}
519156
func (c *ChannelData) URI() string {
	return fmt.Sprintf("%s://%s/%s", c.Protocol, c.Server, c.Channel)
}