Skip to content

Commit

Permalink
Workaround FrontEnd returning an invalid UTF8 sequance. Works around #32
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmelsayed committed Mar 4, 2015
1 parent 4b029d0 commit e5d084f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Slingshot.Api/Controllers/ARMController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,8 @@ private async Task<JArray> GetTenantsArray()
return null;
}

var tenants = await response.Content.ReadAsAsync<JArray>();
var tenantsString = await response.Content.ReadAsStringAsync();
var tenants = JArray.Parse(tenantsString);
tenants = SetCurrentTenant(tenants);
return tenants;
}
Expand All @@ -445,7 +446,8 @@ private async Task<JArray> GetTenantsArray()
return null;
}

var tenants = (JArray)(await response.Content.ReadAsAsync<JObject>())["value"];
var tenantsString = await response.Content.ReadAsStringAsync();
var tenants = (JArray)(JObject.Parse(tenantsString))["value"];
tenants = SetCurrentTenant(ToTenantDetails(tenants));
return tenants;
}
Expand Down

0 comments on commit e5d084f

Please sign in to comment.