HttpURI

Http URI. Parse a HTTP URI from a string or byte array. Given a URI <code>http://user@host:port/path/info;param?query#fragment</code> this class will split it into the following undecoded optional elements: <ul> <li>{@link #getScheme()} - http:</li> <li>{@link #getAuthority()} - //name@host:port</li> <li>{@link #getHost()} - host</li> <li>{@link #getPort()} - port</li> <li>{@link #getPath()} - /path/info</li> <li>{@link #getParam()} - param</li> <li>{@link #getQuery()} - query</li> <li>{@link #getFragment()} - fragment</li> </ul>

https://bob:bobby@www.lunatech.com:8080/file;p=1?q=2#third \___/ \_/ \___/ \______________/ \__/\_______/ \_/ \___/ | | | | | | \_/ | | Scheme User Password Host Port Path | | Fragment \_____________________________/ | Query | Path parameter Authority <p> Any parameters will be returned from {@link #getPath()}, but are excluded from the return value of {@link #getDecodedPath()}. If there are multiple parameters, the {@link #getParam()} method returns only the last one.

Constructors

this
this()
Undocumented in source.
this
this(string scheme, string host, int port, string path, string param, string query, string fragment)
Undocumented in source.
this
this(HttpURI uri)
Undocumented in source.
this
this(string uri)
Undocumented in source.
this
this(string scheme, string host, int port, string pathQuery)
Undocumented in source.

Members

Functions

clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
decodeQuery
MultiMap!string decodeQuery()
Undocumented in source. Be warned that the author may not have intended to support it.
equals
bool equals(Object o)
Undocumented in source. Be warned that the author may not have intended to support it.
getAuthority
string getAuthority()
Undocumented in source. Be warned that the author may not have intended to support it.
getDecodedPath
string getDecodedPath()
Undocumented in source. Be warned that the author may not have intended to support it.
getFragment
string getFragment()
Undocumented in source. Be warned that the author may not have intended to support it.
getHost
string getHost()
Undocumented in source. Be warned that the author may not have intended to support it.
getParam
string getParam()
Undocumented in source. Be warned that the author may not have intended to support it.
getPassword
string getPassword()
Undocumented in source. Be warned that the author may not have intended to support it.
getPath
string getPath()

The parsed Path.

getPathQuery
string getPathQuery()
Undocumented in source. Be warned that the author may not have intended to support it.
getPort
int getPort()
Undocumented in source. Be warned that the author may not have intended to support it.
getQuery
string getQuery()
Undocumented in source. Be warned that the author may not have intended to support it.
getScheme
string getScheme()
Undocumented in source. Be warned that the author may not have intended to support it.
getUser
string getUser()
Undocumented in source. Be warned that the author may not have intended to support it.
getUserInfo
string getUserInfo()
Undocumented in source. Be warned that the author may not have intended to support it.
hasAuthority
bool hasAuthority()
Undocumented in source. Be warned that the author may not have intended to support it.
hasQuery
bool hasQuery()
Undocumented in source. Be warned that the author may not have intended to support it.
isAbsolute
bool isAbsolute()
Undocumented in source. Be warned that the author may not have intended to support it.
parse
void parse(string uri)
Undocumented in source. Be warned that the author may not have intended to support it.
parse
void parse(string uri, int offset, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
parseRequestTarget
void parseRequestTarget(string method, string uri)

Parse according to https://tools.ietf.org/html/rfc7230#section-5.3

setAuthority
void setAuthority(string host, int port)

@param host the host @param port the port

setPath
void setPath(string path)

@param path the path

setPathQuery
void setPathQuery(string path)

@param path the decoded path

setQuery
void setQuery(string query)
Undocumented in source. Be warned that the author may not have intended to support it.
setScheme
void setScheme(string scheme)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

createHttpURI
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.

Variables

_decodedPath
string _decodedPath;
Undocumented in source.
_uri
string _uri;
Undocumented in source.

See Also

Meta