Get response time and response size

Hi,

I know that we have flow.request.timestamp_start and flow.response.timestamp_end properties which return the time in epoch format. But do we have an inbuilt function which I can use to fetch total time the request<->response took ?
Also, is there a method/property which I can use to get the size of the response content ?
basically I am interested in somethim like this which you see in the console when you launch mitmproxy -
<- 200 application/json 268B 139ms

Thanks,
Kapil.

Hi @qakapil,

As you said, that’s just response.timestamp_end - request.timestamp_start. There’s no extra function for this.

len(response.content) ?

Hi @mhils,
Thanks for the quick reply. I was almost there :slight_smile:

cheers!
Kapil.