Get Progress of HTTPRequest in Java
问题 i got a java method which returns the response of the website in a string. Now i want to add the possibility to track the progress of this request. I know i can calculate it via (contenLength/readBytes) *100. But i am not sure how to retrieve this information properly and update the progress everytime it changes. My current method looks like this: public String executePost(URL url) { StringBuffer sb = new StringBuffer(); int readBytes = 0; int contentLength = 0; int progress = 0; try { String