Sending POST params and why isn't DefaultHttpDataFactory not in the releases?
imagenesis
imagenesis at gmail.com
Tue Sep 6 14:50:45 EDT 2011
HttpRequest httpReq=new
DefaultHttpRequest(HttpVersion.HTTP_1_1,HttpMethod.POST,uri);
httpReq.setHeader(HttpHeaders.Names.HOST,host);
httpReq.setHeader(HttpHeaders.Names.CONNECTION,HttpHeaders.Values.KEEP_ALIVE);
httpReq.setHeader(HttpHeaders.Names.ACCEPT_ENCODING,HttpHeaders.Values.GZIP);
String params=ReqUtil.uri(req);
ChannelBuffer
cb=ChannelBuffers.copiedBuffer(params,Charset.defaultCharset());
httpReq.setHeader(HttpHeaders.Names.CONTENT_LENGTH,cb.readableBytes());
httpReq.setContent(cb);
Does not yield a valid request. What is the correct way to send a post
request, preferably why constructing the parameters data manually as opposed
to with the DataFactory. Also, why is HttpDataFactory not included in any of
the releases?
--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Sending-POST-params-and-why-isn-t-DefaultHttpDataFactory-not-in-the-releases-tp6765186p6765186.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list