-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
After installing LINQBridge one of our project was throwing runtime errors. We debugged and found the problem in serializing/deserializing data.
The error was in the BaseHTTPClient
After replacing
`
protected static T ReadResponse(HttpResponseMessage response)
{
if (response.IsSuccessStatusCode)
{
var task = response.Content.ReadAsAsync();
return task.Result;
}
response.EnsureSuccessStatusCodeWithContent();
return default(T);
}
`
with this
`
protected static T ReadResponse(HttpResponseMessage response)
{
List m = new List();
m.Add(new JsonMediaTypeFormatter
{
SerializerSettings = new JsonSerializerSettings()
{
TypeNameHandling = TypeNameHandling.All
}
});
if (response.IsSuccessStatusCode)
{
var task = response.Content.ReadAsAsync<T>(m);
return task.Result;
}
response.EnsureSuccessStatusCodeWithContent();
return default(T);
}
`
The problem was solved
Metadata
Metadata
Assignees
Labels
No labels