Skip to content

Commit

Permalink
Unsure why the v2 service started changing its payload.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmclaws committed May 23, 2024
1 parent c772206 commit bc0e23e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Simple.OData.Tests.Client.Integration/TestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public abstract class TestBase : IDisposable
{
private static readonly HttpClient metadataHttpClient = new();

protected const string ODataV2ReadWriteUri = "https://services.odata.org/V2/%28S%28readwrite%29%29/OData/OData.svc/";
protected const string ODataV2ReadWriteUri = "https://services.odata.org/V2/%28S%28readwrite%29%29/odata/OData.svc/";
protected const string ODataV3ReadOnlyUri = "https://services.odata.org/V3/OData/OData.svc/";
protected const string ODataV3ReadWriteUri = "https://services.odata.org/V3/%28S%28readwrite%29%29/OData/OData.svc/";
protected const string ODataV4ReadOnlyUri = "https://services.odata.org/V4/OData/OData.svc/";
Expand Down Expand Up @@ -47,7 +47,7 @@ private async static Task<string> GetReadWriteUri(string serviceUri)
if (serviceUri == ODataV2ReadWriteUri)
{
var i1 = uri.IndexOf(".org/V");
var i2 = uri.IndexOf("/OData/");
var i2 = uri.IndexOf("/OData/") == -1 ? uri.IndexOf("/odata/") : uri.IndexOf("/OData/");
#if NET7_0_OR_GREATER
uri = string.Concat(uri.AsSpan()[..(i1 + 5)], uri.AsSpan(i1 + 8, i2 - i1 - 7), uri.AsSpan(i1 + 5, 2), uri.AsSpan()[i2..]);
#else
Expand Down
2 changes: 1 addition & 1 deletion src/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"version": "8.0.300",
"rollForward": "latestFeature"
}
}

0 comments on commit bc0e23e

Please sign in to comment.