John Graham-Cumming <
jgra...@gmail.com>
writes:
> I'd like to be able to disable the 'dechunking' of chunked responses
> so that I get the raw response after the headers (i.e. I want to be
> able to see the chunks). Is there a way to do this?
Certainly the easiest way to do this would be to create an
http.Request and write it to a socket and read until an empty line
(using Request.Write).
I think any http response reader that sees chunked will give you a
body that compensates for both chunked and content length
automatically. But reading the response is pretty straightforward.
net/textproto can handle much of it for you if you actually do want
access to the headers.
Also: Why do you want the chunk info? That *feels* like you might be
doing something weird.
--
dustin