Class HonuaPathSegment
- Namespace
- Honua.Sdk.Abstractions
- Assembly
- Honua.Sdk.Abstractions.dll
Encodes one URI path segment and rejects values that HTTP dot-segment removal would collapse.
public static class HonuaPathSegment
- Inheritance
-
HonuaPathSegment
- Inherited Members
Remarks
EscapeDataString(string) leaves . and .. unchanged.
HttpClient then merges a relative URI into BaseAddress
with RFC 3986 remove_dot_segments, so those two values walk off the intended route.
A slash is percent-encoded and stays inside the one segment.
Methods
Escape(string?, string)
Returns value encoded as a single path segment.
public static string Escape(string? value, string paramName)
Parameters
valuestringThe raw segment text.
paramNamestringThe parameter name reported when
valueis rejected.
Returns
- string
The encoded segment.
Exceptions
- ArgumentException
valueis null, empty, whitespace,.,.., or contains a control character, orparamNameis null or whitespace.