Package org.wiremock.url
Interface PathAndQuery
- All Superinterfaces:
org.wiremock.stringparser.ParsedString,RelativeUrl,Uri,Url
Represents a path and query component combination, which is a type of relative reference.
A PathAndQuery consists of a path and an optional query, with no scheme, authority, or fragment. It is typically used to represent the part of a URL after the authority.
Implementations must be immutable and thread-safe.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.wiremock.url.RelativeUrl
RelativeUrl.Builder, RelativeUrl.Transformer -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PathAndQueryAn empty path and query with no components. -
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable AuthorityDeprecated.This always returns null so you have no reason to ever call itdefault @Nullable FragmentDeprecated.This always returns null so you have no reason to ever call itdefault PathAndQueryDeprecated.static PathAndQuerystatic PathAndQuerystatic PathAndQueryParses a string into a path and query.default PathAndQueryremovePathPrefix(Path prefix) Methods inherited from interface org.wiremock.stringparser.ParsedString
toStringMethods inherited from interface org.wiremock.url.RelativeUrl
getScheme, isAbsolute, isAbsoluteUrl, isOpaqueUri, isRelative, thawMethods inherited from interface org.wiremock.url.Uri
getHost, getPath, getPort, getQuery, getQueryOrEmpty, getResolvedPort, getUserInfo, toJavaUri
-
Field Details
-
EMPTY
An empty path and query with no components.
-
-
Method Details
-
getAuthority
Deprecated.This always returns null so you have no reason to ever call itImplementations must ALWAYS return null- Specified by:
getAuthorityin interfaceUri- Returns:
- null
-
getFragment
Deprecated.This always returns null so you have no reason to ever call itImplementations must ALWAYS return null- Specified by:
getFragmentin interfaceUri- Returns:
- null
-
getPathAndQuery
Deprecated.Description copied from interface:UrlReturns the path and query components combined.- Specified by:
getPathAndQueryin interfaceUrl- Returns:
- the path and query
-
parse
Parses a string into a path and query.- Parameters:
pathAndQuery- the string to parse- Returns:
- the parsed path and query
- Throws:
IllegalPathAndQuery- if the string is not a valid path and query
-
of
-
of
-
removePathPrefix
-