feat(BaseHttpClientService): Path getter und intter entfernt und geschützte readonly _path Variable hinzugefügt.
This commit is contained in:
parent
bcfb5a8a70
commit
997fd533ac
@ -14,7 +14,7 @@ namespace DigitalData.Core.Client
|
|||||||
[StringSyntax("Uri")]
|
[StringSyntax("Uri")]
|
||||||
protected readonly string _uri;
|
protected readonly string _uri;
|
||||||
|
|
||||||
public string Path { get; init; } = string.Empty;
|
protected readonly string _path;
|
||||||
|
|
||||||
protected IEnumerable<KeyValuePair<string, object>>? _headers;
|
protected IEnumerable<KeyValuePair<string, object>>? _headers;
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ namespace DigitalData.Core.Client
|
|||||||
_client = client;
|
_client = client;
|
||||||
_cookies = cookieContainer;
|
_cookies = cookieContainer;
|
||||||
_uri = clientOptions.Value.Uri.Trim(URI_TRIM_CHARS);
|
_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;
|
_headers = clientOptions.Value.Headers;
|
||||||
_queryParams = clientOptions.Value.QueryParams;
|
_queryParams = clientOptions.Value.QueryParams;
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ namespace DigitalData.Core.Client
|
|||||||
uriBuilder.Scheme = scheme;
|
uriBuilder.Scheme = scheme;
|
||||||
if (port is int portInt)
|
if (port is int portInt)
|
||||||
uriBuilder.Port = 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
|
// Add query parameters if provided
|
||||||
if (queryParams?.Any() ?? false)
|
if (queryParams?.Any() ?? false)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user