Package org.wiremock.url
Interface Fragment
- All Superinterfaces:
Normalisable<Fragment>,org.wiremock.stringparser.ParsedString,PercentEncoded<Fragment>
Represents the fragment component of a URI as defined in RFC 3986 Section 3.5.
The fragment identifier provides direction to a secondary resource, such as a section within a document. Fragments are not sent to the server but are used by the client. Fragment strings may contain percent-encoded characters.
Implementations must be immutable and thread-safe.
- See Also:
-
Field Summary
Fields -
Method Summary
Methods inherited from interface org.wiremock.url.Normalisable
isNormalFormMethods inherited from interface org.wiremock.stringparser.ParsedString
toStringMethods inherited from interface org.wiremock.url.PercentEncoded
decode, isEmpty, length
-
Field Details
-
EMPTY
-
-
Method Details
-
normalise
Fragment normalise()Returns a normalised form of this fragment.- Specified by:
normalisein interfaceNormalisable<Fragment>- Returns:
- a normalised fragment
-
parse
Parses a string into a fragment.- Parameters:
fragment- the string to parse- Returns:
- the parsed fragment
- Throws:
IllegalFragment- if the string is not a valid fragment
-
encode
Encodes a string into a valid fragment with proper percent-encoding.- Parameters:
unencoded- the unencoded string- Returns:
- the encoded fragment
-