【发布时间】:2011-05-11 14:48:06
【问题描述】:
请问我应该为以下 C# 代码使用哪些等效的 java api ?我需要的是检查响应时间。
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(address);
System.Diagnostics.Stopwatch timer = new Stopwatch();
timer.Start();
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
timer.Stop();
TimeSpan timeTaken = timer.Elapsed;
提前致谢。
【问题讨论】:
标签: c# java httprequest response-time