Gets a full URI for the given path, based on the request URI.
340063
public static URI getUri(UriInfo uriInfo,
                             HttpServletRequest req,
                             String path) {
        String suffix = "";
        if (req.getRequestURI().endsWith(".json")) {
            suffix = ".json";
        } else if (req.getRequestURI().endsWith(".xml")) {
            suffix = ".xml";
        }
        return URI.create(uriInfo.getBaseUri() + "/" + path + suffix);
    }
71007
def get_uri(self):
        """"""
        uri = "%s://%s%s" % (self.scheme, self.get_canonical_host(), self.path)
        return uri
629299
def get(self, path):
        
        data = self.app.test_client().get("/%s" % path).data
        return data
852387
def validate_resource_uri(self, path):
        """"""
        if self._base_uri not in path:
            logger.exception('Get by uri : unrecognized uri: (%s)' % path)
            raise exceptions.HPOneViewUnknownType(UNRECOGNIZED_URI)
545547
private URI buildURI(String path) throws URISyntaxException
   {
      try
      {
         return new URI(path);
      }
      catch (URISyntaxException e)
      {
         return new URI(TextUtil.escape(path, '%', true));
      }
   }
137231
def get_full_url(self, parsed_url):
        
        full_path = parsed_url.path
        if parsed_url.query:
            full_path = '%s?%s' % (full_path, parsed_url.query)
        return full_path
1023518
def full_url(self):
        """"""

        if not self.url:
            raise URLRequired()

        # Support for unicode domain names and paths.
        scheme, netloc, path, params, query, fragment = urlparse(self.url)

        if not scheme:
            raise ValueError()

        netloc = netloc.encode('idna')

        if isinstance(path, unicode):
            path = path.encode('utf-8')

        path = urllib.quote(urllib.unquote(path))

        url = str(urlunparse([ scheme, netloc, path, params, query, fragment ]))

        if self._enc_params:
            if urlparse(url).query:
                return '%s&%s' % (url, self._enc_params)
            else:
                return '%s?%s' % (url, self._enc_params)
        else:
            return url
369627
def request_uri(self):
        """"""
        uri = self.path or '/'

        if self.query is not None:
            uri += '?' + self.query

        return uri
1069842
protected String getRequestPath(String requestFullPath, String servletContextPath, String servletPath) {
		return requestFullPath.substring(escapedLength(servletContextPath) + escapedLength(servletPath));
	}
104760
def get(path='/', params={})
      uri = Addressable::URI.new
      uri.query_values = params
      # Build the path with + instead of %20 because nba.com is flaky
      full_path = "#{path}?#{uri.query.gsub(/%20/,'+')}"
      request(:get, full_path)
    end
70016
public String getUserResourceUri(final String path){
        if(StringUtils.isEmpty(path)) {
            throw new IllegalArgumentException("Path cannot be null");
        }
        return StringUtils.join(new String[] {getUserUri(), path}, "/");
    }
995246
def get(self, path, *args, **kwargs):
        ''''''
        target = self._host.relative(path).utf8
        if not isinstance(target, basestring):
            # on older versions of the `url` library, .utf8 is a method, not a property
            target = target()
        params = kwargs.get('params', {})
        params.update(self._params)
        kwargs['params'] = params
        logger.debug('GET %s with %s, %s', target, args, kwargs)
        return requests.get(target, *args, **kwargs)
11213
private static String getPath(String uri) {
        int offset = 0;
        if (uri.startsWith("http://")) {
            offset = "http://".length();
        } else if (uri.startsWith("https://")) {
            offset = "https://".length();
        }

        if (offset == 0) {
            return uri;
        } else {
            int firstSlash = uri.indexOf('/', offset);
            return -1 != firstSlash? uri.substring(firstSlash) : uri;
        }
    }
182300
public static final String getRelativeURI( String contextPath, String uri )
    {
        String requestUrl = uri;
        int overlap = requestUrl.indexOf( contextPath + '/' );
        assert overlap != -1 : "contextPath: " + contextPath + ", uri: " + uri;
        return requestUrl.substring( overlap + contextPath.length() );
    }
337056
def get(self, path, query, **options):
        """"""
        api_options = self._parse_api_options(options, query_string=True)
        query_options = self._parse_query_options(options)
        parameter_options = self._parse_parameter_options(options)

        # options in the query takes precendence
        query = _merge(query_options, api_options, parameter_options, query)
        return self.request('get', path, params=query, **options)
749343
public static String decodePath(String path) {
        URI tmp;

        try {
            tmp = new URI("scheme://host/" + path);
        } catch (URISyntaxException e) {
            throw new IllegalStateException(e);
        }
        return tmp.getPath().substring(1);
    }
477394
private String parsePath(String path) {
        path = PathKit.fixPath(path);
        try {
            URI uri = new URI(path);
            return uri.getPath();
        } catch (URISyntaxException e) {
            //log.error("parse [" + path + "] error", e);
            return path;
        }
    }