How can I find the response time of a HTTP request

2020-05-31 04:30发布

I'm using a Java socket, connected to a server. If I send a HEADER http request, how can I measure the response time from the server? Must I use a provided java timer, or is there an easier way?

I'm looking for a short answer, I don't want to use other protocols etc. Obviously do I neither want to have a solution that ties my application to a specific OS. Please people, IN-CODE solutions only.

标签: java http
7条回答
Fickle 薄情
2楼-- · 2020-05-31 05:15

curl -s -w "%{time_total}\n" -o /dev/null http://server:3000

查看更多
登录 后发表回答