GetCookies-Methode hinzugefügt. Test für http-Dienst hinzugefügt

This commit is contained in:
Developer 02
2024-06-26 16:57:30 +02:00
parent 8d38e883df
commit d84ef820f1
6 changed files with 142 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ namespace DigitalData.Core.Client
public class BaseHttpClientService : IBaseHttpClientService
{
protected readonly HttpClient _client;
protected readonly CookieContainer _cookies;
protected readonly CookieContainer _cookies;
[StringSyntax("Uri")]
public string Uri { get; init; }
@@ -20,6 +20,8 @@ namespace DigitalData.Core.Client
Uri = clientOptions.Value.Uri;
}
public CookieCollection GetCookies(string route = "") => _cookies.GetCookies(uri: new Uri(Uri + route));
public async Task<HttpResponseMessage> FetchAsync(
string route = "",
HttpMethod? method = null,