Skip to content

Commit 7b2781f

Browse files
committed
add country header to app client
this header is now required in the acquireVehicles API call otherwise the API returns the error "Refresh Token has expired"
1 parent 8470b53 commit 7b2781f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

libgwmapi.test/GwmApiClientTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ private GwmApiClient GetAuthenticatedClient()
239239
{
240240
var client = GetClient();
241241
client.SetAccessToken("<accessToken>");
242+
client.Country = "<country>";
242243
return client;
243244
}
244245
}

libgwmapi/GwmApiClient.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public string Country
5050
{
5151
_h5Client.DefaultRequestHeaders.Remove("country");
5252
_h5Client.DefaultRequestHeaders.Add("country", value);
53+
_appClient.DefaultRequestHeaders.Remove("country");
54+
_appClient.DefaultRequestHeaders.Add("country", value);
5355
}
5456
}
5557

0 commit comments

Comments
 (0)