Package org.wiremock.url
Interface BaseUrl
- All Superinterfaces:
AbsoluteUri,AbsoluteUrl,Normalisable<AbsoluteUri>,org.wiremock.stringparser.ParsedString,ServersideAbsoluteUrl,Uri,Url,UrlWithAuthority
- All Known Subinterfaces:
Origin
- All Known Implementing Classes:
BaseUrlValue
A base url is a url whose path is either empty or ends with a slash, and which has neither a
query nor a fragment.
You can always resolve a relative path (and query and fragment) onto it and it will effectively be appended to the base url:
https://example.com resolve some/path?q#f == https://example.com/some/path?q#fhttps://example.com/base/path/ resolve some/path?q#f == https://example.com/base/path/some/path?q#f
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.wiremock.url.AbsoluteUrl
AbsoluteUrl.Builder, AbsoluteUrl.Transformer -
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable QuerygetQuery()Deprecated.This always returns null so you have no reason to ever call itdefault BaseUrlDeprecated.Returns a normalised form of this base urlstatic BaseUrlstatic BaseUrlstatic BaseUrlParses a string into a base url.default BaseUrlDeprecated.Methods inherited from interface org.wiremock.url.AbsoluteUri
getScheme, isAbsolute, isNormalForm, resolve, resolveMethods inherited from interface org.wiremock.url.AbsoluteUrl
getAuthority, getHost, getOrigin, getSchemeRelativeUrl, isAbsoluteUrl, isOpaqueUri, isRelative, resolve, resolve, resolve, thaw, transformMethods inherited from interface org.wiremock.stringparser.ParsedString
toStringMethods inherited from interface org.wiremock.url.ServersideAbsoluteUrl
getFragmentMethods inherited from interface org.wiremock.url.Uri
getPath, getPort, getQueryOrEmpty, getResolvedPort, getUserInfo, toJavaUriMethods inherited from interface org.wiremock.url.Url
getPathAndQuery
-
Method Details
-
normalise
BaseUrl normalise()Returns a normalised form of this base url- Specified by:
normalisein interfaceAbsoluteUri- Specified by:
normalisein interfaceAbsoluteUrl- Specified by:
normalisein interfaceNormalisable<AbsoluteUri>- Specified by:
normalisein interfaceServersideAbsoluteUrl- Returns:
- a normalised base url
-
getServersideAbsoluteUrl
Deprecated.Returns this.- Specified by:
getServersideAbsoluteUrlin interfaceAbsoluteUrl- Specified by:
getServersideAbsoluteUrlin interfaceServersideAbsoluteUrl- Returns:
- this
-
getQuery
Deprecated.This always returns null so you have no reason to ever call itImplementations must ALWAYS return null -
toBaseUrl
Deprecated.Returns this.- Specified by:
toBaseUrlin interfaceAbsoluteUrl- Returns:
- this
-
parse
Parses a string into a base url.- Parameters:
baseUrl- the string to parse- Returns:
- the parsed base url
- Throws:
IllegalBaseUrl- if the string is not a valid base url
-
of
-
of
-