Package org.azd.utils
Class UrlBuilder
java.lang.Object
org.azd.utils.UrlBuilder
Utility class to build the url.
-
Method Summary
Modifier and TypeMethodDescriptionappendPath
(String path) Appends the path value with the base address and return the instance of Url builder.appendQueryString
(String key, String value) Appends the query string with formed url.build()
Return the new URI formed upon build.static UrlBuilder
fromBaseUrl
(String baseUrl) Creates a new instance of UrlBuilder with the given base address.
-
Method Details
-
fromBaseUrl
Creates a new instance of UrlBuilder with the given base address.- Parameters:
baseUrl
- Pass the base url.- Returns:
- UrlBuilder
UrlBuilder
-
appendPath
Appends the path value with the base address and return the instance of Url builder.- Parameters:
path
- path value to append.- Returns:
- UrlBuilder
UrlBuilder
-
appendQueryString
Appends the query string with formed url.- Parameters:
key
- Name of the query parameter.value
- Value for the query parameter.- Returns:
- UrlBuilder
UrlBuilder
-
build
Return the new URI formed upon build.- Returns:
- URI
URI
-