Im trying to make a get request and while it able to get data for certain values it timeouts for the others. However when i make the call from post UI it is consistently successful which proves that nothing is wrong with the service . I've found an issue(github.com/mono/mono/issues/11455) online which is similar but couldn't understand if it is solved or not from the comments
Below is the code
try
{
var uri = new Uri(CommonManager.ProdServiceUrl + "GetDeliveryProfileDetails/" + storeNumber);
var request = new HttpRequestMessage()
{
RequestUri = uri,
Method = HttpMethod.Get
};
// Add header information
AddRequestHeaderInfo(request);
HttpResponseMessage response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
if ((response.StatusCode == System.Net.HttpStatusCode.OK) && (response.IsSuccessStatusCode))
{
var responseContent = await response.Content.ReadAsStringAsync();
DeliveryProfileInfo = JsonConvert.DeserializeObject<DeliveryProfileInfo>(responseContent);
}
else
{
var responseContent = await response.Content.ReadAsStringAsync();
var errorResult = JsonConvert.DeserializeObject<ApiServiceStatus>(responseContent);
throw new Exception(errorResult.ResponseCode + " - " + errorResult.ResponseMessage);
}
}
catch (Exception ex)
{
throw ex;
}