How can I find the response time of a HTTP request through a Socket

前端 未结 7 1537
猫巷女王i
猫巷女王i 2021-02-07 04:13

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 t

7条回答
  •  名媛妹妹
    2021-02-07 04:40

    You can use time and curl and time on the command-line. The -I argument for curl instructs it to only request the header.

    time curl -I 'http://server:3000'
    

提交回复
热议问题