Package org.azd.utils

Class UrlBuilder

java.lang.Object
org.azd.utils.UrlBuilder

public class UrlBuilder extends Object
Utility class to build the url.
  • Method Details

    • fromBaseUrl

      public static UrlBuilder fromBaseUrl(String baseUrl)
      Creates a new instance of UrlBuilder with the given base address.
      Parameters:
      baseUrl - Pass the base url.
      Returns:
      UrlBuilder UrlBuilder
    • appendPath

      public UrlBuilder appendPath(String path)
      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

      public UrlBuilder appendQueryString(String key, String value)
      Appends the query string with formed url.
      Parameters:
      key - Name of the query parameter.
      value - Value for the query parameter.
      Returns:
      UrlBuilder UrlBuilder
    • build

      public URI build()
      Return the new URI formed upon build.
      Returns:
      URI URI