Interface UrlWithAuthority

All Superinterfaces:
org.wiremock.stringparser.ParsedString, Uri, Url
All Known Subinterfaces:
AbsoluteUrl, BaseUrl, Origin, SchemeRelativeUrl, ServersideAbsoluteUrl
All Known Implementing Classes:
BaseUrlValue

public sealed interface UrlWithAuthority extends Url permits SchemeRelativeUrl, AbsoluteUrl
  • Method Details

    • getAuthority

      Authority getAuthority()
      Returns the authority component of this URL.

      URLs always have an authority component (unlike relative references and URNs).

      Specified by:
      getAuthority in interface Uri
      Returns:
      the authority component, never null
    • getSchemeRelativeUrl

      SchemeRelativeUrl getSchemeRelativeUrl()
    • parse

      static UrlWithAuthority parse(String url) throws IllegalUrl
      Parses a string into a URL with an authority.
      Parameters:
      url - the string to parse
      Returns:
      the parsed URI reference
      Throws:
      IllegalUrl - if the string is not a valid URI reference