Class ClientUri

java.lang.Object
io.helidon.webclient.api.ClientUri
All Implemented Interfaces:
Prototype.Api, UriInfo

public class ClientUri extends Object implements UriInfo
URI abstraction for WebClient.
  • Method Details

    • create

      public static ClientUri create()
      Create an empty URI helper.
      Returns:
      uri helper
    • create

      public static ClientUri create(ClientUri baseUri)
      Create a new client uri.
      Parameters:
      baseUri - base URI
      Returns:
      a new client uri
    • create

      public static ClientUri create(UriInfo baseUri)
      Create a new client uri.
      Parameters:
      baseUri - base URI
      Returns:
      a new client uri
    • create

      public static ClientUri create(URI baseUri)
      Create a new client URI from an existing URI.
      Parameters:
      baseUri - base URI
      Returns:
      a new client uri
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toUri

      public URI toUri()
      Convert instance to URI.
      Returns:
      the converted URI
    • scheme

      public ClientUri scheme(String scheme)
      Scheme of this URI.
      Parameters:
      scheme - to use (such as http)
      Returns:
      updated instance
    • host

      public ClientUri host(String host)
      Host of this URI.
      Parameters:
      host - to connect to
      Returns:
      updated instance
    • port

      public ClientUri port(int port)
      Port of this URI.
      Parameters:
      port - to connect to
      Returns:
      updated instance
    • path

      public ClientUri path(String path)
      Path of this URI.
      Parameters:
      path - path to use
      Returns:
      updated instance
    • skipUriEncoding

      public ClientUri skipUriEncoding(boolean skipUriEncoding)
      Whether to skip uri encoding.
      Parameters:
      skipUriEncoding - skip uri encoding
      Returns:
      updated instance
    • resolve

      public ClientUri resolve(URI uri)
      Resolve the provided URI against this URI.
      Parameters:
      uri - URI to use
      Returns:
      updated instance
    • resolvePath

      public ClientUri resolvePath(String path)
      Resolve the provided path against the current path of this URI.
      Parameters:
      path - to resolve
      Returns:
      updated URI
    • resolve

      public ClientUri resolve(ClientUri uri)
      Replaces the current URI with values from the provided URI.
      Parameters:
      uri - URI to use
      Returns:
      updated instance
    • scheme

      public String scheme()
    • host

      public String host()
    • query

      public UriQuery query()
    • fragment

      public UriFragment fragment()
    • authority

      public String authority()
    • port

      public int port()
    • path

      public UriPath path()
    • fragment

      public ClientUri fragment(UriFragment fragment)
      Configure the fragment for this URI.
      Parameters:
      fragment - fragment to use
      Returns:
      updated URI
    • fragment

      public ClientUri fragment(String fragment)
      Configure the fragment for this URI, using its decoded form ("human readable"). If you have an encoded fragment, please use fragment(io.helidon.common.uri.UriFragment).
      Parameters:
      fragment - decoded fragment
      Returns:
      updated URI
    • writeableQuery

      public UriQueryWriteable writeableQuery()
      URI query that can update values.
      Returns:
      writeable query
    • pathWithQueryAndFragment

      public String pathWithQueryAndFragment()
      Encoded path with query and fragment.
      Returns:
      string containing encoded path with query