feat(IHttpClientOptions):
Basispfad zu http-Client-Optionen hinzugefügt
This commit is contained in:
@@ -14,7 +14,7 @@ namespace DigitalData.Core.Tests.Client
|
||||
public void SetUp()
|
||||
{
|
||||
_serviceProvider = new ServiceCollection()
|
||||
.AddHttpClientService("https://jsonplaceholder.typicode.com/todos")
|
||||
.AddHttpClientService("https://jsonplaceholder.typicode.com", "todos")
|
||||
.BuildServiceProvider();
|
||||
|
||||
_service = _serviceProvider.GetRequiredService<IBaseHttpClientService>();
|
||||
@@ -24,7 +24,7 @@ namespace DigitalData.Core.Tests.Client
|
||||
public async Task FetchJsonAsync_ShouldReturnJsonResponse()
|
||||
{
|
||||
// Act
|
||||
var expectedUserId = (int) await _service.FetchAsync("/1", sendWithCookie: false, saveCookie: false)
|
||||
var expectedUserId = (int) await _service.FetchAsync(path: "/1", sendWithCookie: false, saveCookie: false)
|
||||
.ThenAsync(res => res.Json())
|
||||
.ThenAsync(todo => todo.userId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user