以下是一些代码:
var client = new WebClient();
client.BaseAddress = "http://localhost/";
client.Headers["Content-type"] = "application/x-www-form-urlencoded";
client.Proxy = null;
// The server gets the data
var responseStr = client.UploadString(url, data);
...
// The server gets an empty post data
responseStr = client.UploadString(url, data);
Webclient应该是一次性用品吗?
答案 0 :(得分:0)
WebClient client = new WebClient();
client.BaseAddress = "http://localhost/something.php";