Class HttpURI

    • Method Detail

      • createHttpURI

        public static HttpURI createHttpURI​(String scheme,
                                            String host,
                                            int port,
                                            String path,
                                            String param,
                                            String query,
                                            String fragment)
        Construct a normalized URI. Port is not set if it is the default port.
        Parameters:
        scheme - the URI scheme
        host - the URI hose
        port - the URI port
        path - the URI path
        param - the URI param
        query - the URI query
        fragment - the URI fragment
        Returns:
        the normalized URI
      • parse

        public void parse​(String uri)
      • parseRequestTarget

        public void parseRequestTarget​(String method,
                                       String uri)
        Parse according to https://tools.ietf.org/html/rfc7230#section-5.3
        Parameters:
        method - the request method
        uri - the request uri
      • parse

        public void parse​(String uri,
                          int offset,
                          int length)
      • getScheme

        public String getScheme()
      • getHost

        public String getHost()
      • getPort

        public int getPort()
      • getPath

        public String getPath()
        The parsed Path.
        Returns:
        the path as parsed on valid URI. null for invalid URI.
      • getDecodedPath

        public String getDecodedPath()
      • getParam

        public String getParam()
      • getQuery

        public String getQuery()
      • hasQuery

        public boolean hasQuery()
      • getFragment

        public String getFragment()
      • decodeQueryTo

        public void decodeQueryTo​(org.eclipse.jetty.util.MultiMap<String> parameters)
      • clear

        public void clear()
      • isAbsolute

        public boolean isAbsolute()
      • setScheme

        public void setScheme​(String scheme)
      • setAuthority

        public void setAuthority​(String host,
                                 int port)
        Parameters:
        host - the host
        port - the port
      • setPath

        public void setPath​(String path)
        Parameters:
        path - the path
      • setPathQuery

        public void setPathQuery​(String path)
      • setQuery

        public void setQuery​(String query)
      • getPathQuery

        public String getPathQuery()
      • getAuthority

        public String getAuthority()
      • getUser

        public String getUser()