Response time in REST client
Answered
The Intellij REST client gives me an answer like
Response code: 200 (200); Time: 2021ms (2 s 21 ms); Content length: 771481 bytes (771,48 kB)Can I access the time programatically in client.test()?
I know, that I can measure the time myself, but the client has already measured it.
Please sign in to leave a comment.
I'm afraid not. The displayed
Time: ...value is currently UI/runner metadata rather than a script-accessible property.The IntelliJ HTTP Client currently does not expose the UI-measured request duration through
responseorclient.test(). The documented response object provides response data such as status, headers, body, and content type, whileclient.test()only registers assertions.You will need to measure it yourself. Placing the timestamp in a pre-request script will allow you to include the network request duration: