I have a ticket kiosk written in C# using TriPOS. When I send a sales request my UI hangs until it returns or times out.
Ideas?
I have a ticket kiosk written in C# using TriPOS. When I send a sales request my UI hangs until it returns or times out.
Ideas?
You can add a timeout to your Wait like this:
// 10 seconds
readAsync.Wait(10000);
But I have the exact same code and have never had a problem:
HttpResponseMessage response = client.SendRequest(triposurl, postBody, "application/json");
Task<string> readAsync = response.Content.ReadAsStringAsync();
readAsync.Wait();
responseResult = readAsync.Result;
You can add a timeout to your Wait like this:
// 10 seconds
readAsync.Wait(10000);
But I have the exact same code and have never had a problem:
HttpResponseMessage response = client.SendRequest(triposurl, postBody, "application/json");
Task<string> readAsync = response.Content.ReadAsStringAsync();
readAsync.Wait();
responseResult = readAsync.Result;