Skip to content

Commit 99ebbf5

Browse files
authored
(#108) OfflineOptions holds a relative URL to support base addresses that are not at the root. (#110)
1 parent d1b5743 commit 99ebbf5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/CommunityToolkit.Datasync.Client/Offline/Models/OfflineOptions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public EntityDatasyncOptions GetOptions(Type entityType)
5252
{
5353
return new()
5454
{
55-
Endpoint = new Uri($"/tables/{entityType.Name.ToLowerInvariant()}", UriKind.Relative),
55+
Endpoint = new Uri($"tables/{entityType.Name.ToLowerInvariant()}", UriKind.Relative),
5656
HttpClient = HttpClientFactory.CreateClient(),
5757
QueryDescription = new QueryDescription()
5858
};

tests/CommunityToolkit.Datasync.Client.Test/Offline/DatasyncOfflineOptionsBuilder_Tests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public void OfflineOptions_Defaults()
243243
OfflineOptions options = sut.Build();
244244
EntityDatasyncOptions result = options.GetOptions(typeof(Entity3));
245245
result.HttpClient.Should().NotBeNull();
246-
result.Endpoint.ToString().Should().Be("/tables/entity3");
246+
result.Endpoint.ToString().Should().Be("tables/entity3");
247247
result.QueryDescription.ToODataQueryString().Should().Be("");
248248
}
249249
}

0 commit comments

Comments
 (0)