public class Url extends Object
Modifier and Type | Method and Description |
---|---|
Url |
addQueryParameter(String key,
String value)
Allows you to add query parameters to this url (In your browser something
like "?user=bob"
|
static Url |
host(String host)
Create a Url instance from a host.
|
Url |
path(String path)
Set the full path of this Url.
|
String |
toString()
The real life Uri in human readable form.
|
URI |
uri()
Creates a URI from this Uri.
|
public static Url host(String host)
host
- The host e.g. http://myserver:8080 may contain trailing slash
or parts of a path.public Url path(String path)
path
- Eg. "/my/funky/url"public Url addQueryParameter(String key, String value)
key
- The key for this query parameter.value
- The value for this query parameter.public URI uri()
Copyright © 2015. All Rights Reserved.