I m using WebClient to make a request to an API that has a very long running process. But I don t actually need to know the result, I only need the process to be started.
It doesn t matter to me if the process succeeds or fails. So I want to drop the connection as soon as I have made the request.
我怎么能够放弃网络联系? 我不想等待30至60秒的答复:
var client = new WebClient();
string url = "http://example.com/SomeVeryLongRunningProcess/parameter";
client.BeginDownloadString(uri);
client.DropConnection; // how do I drop the connection before the response is received?