feat(BaseHttpClientService): Path getter und intter entfernt und geschützte readonly _path Variable hinzugefügt.

This commit is contained in:
Developer 02 2024-11-25 10:11:13 +01:00
parent bcfb5a8a70
commit 997fd533ac

View File

@ -14,7 +14,7 @@ namespace DigitalData.Core.Client
[StringSyntax("Uri")]
protected readonly string _uri;
public string Path { get; init; } = string.Empty;
protected readonly string _path;
protected IEnumerable<KeyValuePair<string, object>>? _headers;
@ -25,7 +25,7 @@ namespace DigitalData.Core.Client
_client = client;
_cookies = cookieContainer;
_uri = clientOptions.Value.Uri.Trim(URI_TRIM_CHARS);
Path = clientOptions.Value.Path.Trim(URI_TRIM_CHARS);
_path = clientOptions.Value.Path.Trim(URI_TRIM_CHARS);
_headers = clientOptions.Value.Headers;
_queryParams = clientOptions.Value.QueryParams;
}
@ -70,7 +70,7 @@ namespace DigitalData.Core.Client
uriBuilder.Scheme = scheme;
if (port is int portInt)
uriBuilder.Port = portInt;
uriBuilder.Path = UriCombine(Path, path?.Trim(URI_TRIM_CHARS) ?? string.Empty);
uriBuilder.Path = UriCombine(_path, path?.Trim(URI_TRIM_CHARS) ?? string.Empty);
// Add query parameters if provided
if (queryParams?.Any() ?? false)