public static class WebUtils.Url extends Object
WebUtils.Url url = new WebUtils.Url("someServlet") .param("name", nameField.getValue()) .param("pass", passwordField.getValue()); RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, url.toString()); ...The URL supplied to the request builder might be something like:
"someServlet?name=Simon&pass=SeCrEt"
Constructor and Description |
---|
WebUtils.Url(String url)
Constructs a url with the specified base path.
|
Modifier and Type | Method and Description |
---|---|
WebUtils.Url |
add(String path)
Adds a path segment to the end of the URL.
|
WebUtils.Url |
param(String name,
Object value)
Adds a parameter to the 'query string'.
|
String |
toString() |
public WebUtils.Url(String url)
url
- the base urlpublic WebUtils.Url add(String path)
path
- path segment to be appended to the URL.public WebUtils.Url param(String name, Object value)
name
- the name of the parametervalue
- the value of the parameterCopyright © 2015. All Rights Reserved.