hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chun Tat David Chu <beyonddc.stor...@gmail.com>
Subject Consuming chunk encoded data
Date Wed, 09 Oct 2013 17:58:04 GMT
Hi all,

Is there an utility or a technique in HTTP Client that allows you to
consume chunk encoded data whenever one chunk arrived on the wire?  Perhaps
I overlooked this but I couldn't find anything related with this topic.

Here's what coming in over the wire.
HttpResponseHandlerImpl.setContentType(): application/json
HttpResponseHandlerImpl.setContentLength(): -1
58495 [main] DEBUG org.apache.http.wire  - << "24[\r][\n]"
58495 [main] DEBUG org.apache.http.wire  - <<
"{"firstName":"David","lastName":"0"}"
58495 [main] DEBUG org.apache.http.wire  - << "[\r][\n]"
58495 [main] DEBUG org.apache.http.wire  - << "24[\r][\n]"
58495 [main] DEBUG org.apache.http.wire  - <<
"{"firstName":"David","lastName":"1"}"
58495 [main] DEBUG org.apache.http.wire  - << "[\r][\n]"
58495 [main] DEBUG org.apache.http.wire  - << "24[\r][\n]"
58495 [main] DEBUG org.apache.http.wire  - <<
"{"firstName":"David","lastName":"2"}"
58501 [main] DEBUG org.apache.http.wire  - << "[\r][\n]"
58501 [main] DEBUG org.apache.http.wire  - << "0[\r][\n]"
58501 [main] DEBUG org.apache.http.wire  - << "[\r][\n]"

What I want to do is to process a chunk at a time.  Is there any helper
method that allows you to do this? or I just need to get the InputStream
and do this manually?  Manually as in get the chunk size then read the
buffer based on the chunk size.

Thanks!

David

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message