The best way is the simplest way (i.e. you just read bytes from the InputStream you get from the connection).
Joined: Jan 22, 2004
Thanks Paul. I have tried that, but when I get display the content, it is just a load of garbage (i.e., rather than html).
I've noticed with my HttpTracer that the response I'm trying to read includes lines that have "1000" content - presumably that describe the length of the following block and are causing a problem when trying to read the actual content. Do you know how I can handle this?
PS - As chunked transfer encoding came around in HTTP 1.1, do you know if it's possible for me to change my request GET header to HTTP/1.0 as hopefully that would mean the response wouldn't then be chunked?
subject: How to read with HttpURLConnection when transfer-encoding: chunked ?