hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajani Karuturi <rajanikarut...@gmail.com>
Subject httpcomponents nio server usage
Date Fri, 16 Jan 2015 23:38:53 GMT
Hi all,
I am trying to use httpcomponents nio server to handle post request file

I am facing two issues:
1. how to parse the request?
I could get the entire data including parameters and file content separated
by boundary. Is there a default parser available so that I could do
request.getParameter("param1"), request.getFile() etc.
Stackoverflow question with sample code:

2. How to read the data in chunks?
I couldnt figure out a way to read the data in chunks.
HttpEntity.getContent().read is always returning me null. Whereas,
EntityUtils.toByteArray(entity) is giving the complete data.
stackoverflow question with sample code:

looking for any help/suggestions in solving these.

Thanks in advance.


PS: posting it here as the user list is httpclient-users and not about

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