Open mathew-kurian opened 9 years ago
I see. Thank you. I am using an InputStream for the body.
Do you know the length in advance? Then you could have a look at ProxyInputStream (as an example) and let this stream call you back when bytes are read.
Obviously without the length you can just report the number of bytes transferred, but not the percentage.
I'll leave this issue open as an enhancement request, because this is one of the features requested most often.
Currently there is no easy way of getting the progress. It's one of the features I'm thinking about to implement, but not in next future.
In the meantime, if it's really important for you, you could do following:
Create an intercepting InputStream which counts the number of read-calls (or bytes read). Wrap your real InputStream with this intercepting stream and give this to DavidWebb as body of the request. Your interception can now track the progress.
What do you use as body? byte[], File, InputStream, String, ...?