Table of Contents

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

value string

The raw segment text.

paramName string

The parameter name reported when value is rejected.

Returns

string

The encoded segment.

Exceptions

ArgumentException

value is null, empty, whitespace, ., .., or contains a control character, or paramName is null or whitespace.