貌似是过了晚上10点之后就不能充值了 TT
Continue reading “如何向校园一卡通充值?”
HttpClient 是支持重入的
代码如下
using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { var x = new HttpClient(); var t1 = x.GetAsync("http://www.baidu.com"); var t2 = x.GetAsync("http://www.zhihu.com"); Task.WaitAll(t1, t2); Console.WriteLine(t1.Result.StatusCode); Console.WriteLine(t2.Result.StatusCode); } } }
运行结果如下
OK OK 请按任意键继续. . .