Skip to content

Commit 4973130

Browse files
committed
Fix edge case bug when using httpclient without a base address
1 parent 34cfdce commit 4973130

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ScryfallApi.Client/Apis/BaseRestService.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ internal sealed class BaseRestService
1414
public BaseRestService(HttpClient httpClient, ScryfallApiClientConfig clientConfig, IMemoryCache cache)
1515
{
1616
_httpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient));
17+
if (_httpClient.BaseAddress is null)
18+
_httpClient.BaseAddress = clientConfig.ScryfallApiBaseAddress;
1719
_clientConfig = clientConfig;
1820
_cache = cache;
1921

0 commit comments

Comments
 (0)