I have made an app which makes a request to a xmlfeed. When I try to send a request through the app from my own android device returns a blank result string. But when i try from the android emulator or UWP on my laptop, it returns the xmlstring. Im using Httpclient.
I have tried to call the request in the browser on the device, and it also returns the string with the correct values. When i debug it breaks at the deserializing, because the result string is "".
public async Task<XmlData> GetAllDataForToday(DateTime dt)
{
HttpClient client = GetClient();
string result = await client.GetStringAsync(Url + "getData.aspx? + "fromDate=" + dt + "&toDate=" + dt);
XmlSerializer Deserializer = new XmlSerializer(typeof(XmlData), new XmlRootAttribute("XmlData"));
var reader = new StringReader(result);
XmlData DataCollection = (XmlData)Deserializer.Deserialize(reader);
return DataCollection;
}
What could be the issue?