I have some code that does a bunch of HTTP GETs, POSTs, and PUTs using Commons HttpClient 3.1. I'd like to provide a current transfer speed indicator in my GUI, but was unable to find any methods for determining the transfer rate of a HttpMethod being processed.
I could easily just time the transfer and do some simple math after it was complete to determine what the speed was, but this provides a bad user experience during a long upload or download. Does anyone know how to determine the transfer rate of a Commons HttpClient request while it is still being processed?