public interface UrlBuilder
Build a URL typically using a base url and adding path and query parameters.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Return the full URL.static String
URL encode the value.matrixParam
(String name, Object value) Append a matrix parameter.matrixParam
(String name, String value) Append a matrix parameter.static UrlBuilder
Create a UrlBuilder with a base url.path
(int val) Add a path segment to the url.path
(long val) Add a path segment to the url.Add a path segment to the url.Add a path segment to the url.queryParam
(String name, Object value) Append a query parameter.queryParam
(String name, String value) Append a query parameter.queryParam
(Map<String, ?> params) Append a query parameters.Set the url.
-
Method Details
-
enc
URL encode the value. -
of
Create a UrlBuilder with a base url. -
url
Set the url. This effectively replaces a base url. -
path
Add a path segment to the url.This includes appending a "/" prefix with the path.
-
path
Add a path segment to the url. -
path
Add a path segment to the url. -
path
Add a path segment to the url. -
queryParam
Append a query parameter.The name and value parameters are url encoded.
-
queryParam
Append a query parameter.The name and value parameters are url encoded.
-
queryParam
Append a query parameters. -
matrixParam
Append a matrix parameter.The name and value parameters are url encoded.
-
matrixParam
Append a matrix parameter.The name and value parameters are url encoded.
-
build
String build()Return the full URL.
-