I'm making a snippet that sends data to a website that analyses it then sends back results.
Is there any way to make my GetAsych wait until the website finishes its calculation before getting a "full response"?
Ps: The await will not know if the page requested contains any asynchronous processing (eg: xhr calls)- I already use await and ReadAsByteArrayAsync()/ReadAsStringAsync()
Thank you!
What you're looking for here is the
awaitoperator. According to the docs:Sample use within the context of an
HttpClientobject:Note that the method that encloses the
await-ed code is marked asasyncand has a return type ofTask(Task<T>would also work, depending on your needs).