@@ -0,0 +1,1779 @@
+import com.xw.http.*;%0Aimport io.netty.channel.ChannelPipeline;%0Aimport io.netty.handler.codec.http.FullHttpRequest;%0Aimport io.netty.handler.codec.http.HttpHeaderNames;%0Aimport io.netty.handler.codec.http.HttpHeaderValues;%0A%0A/**%0A * Author: junjie%0A * Date: 3/25/15.%0A * Target: %3C%3E%0A */%0Apublic class Foo %7B%0A    public static void main(String%5B%5D args) %7B%0A        final String url = %22http://cn.bing.com%22;%0A        final String data = %22Hello%22;%0A        final int timeout = 500;%0A%0A        NClient.post(new RequestBuilder(url, data) %7B%0A                         @Override%0A                         public FullHttpRequest setup(FullHttpRequest request) %7B%0A                             // customize the http headers%0A                             request.headers().set(HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE)%0A                                     .set(HttpHeaderNames.ACCEPT_ENCODING, HttpHeaderValues.GZIP)%0A                                     .set(HttpHeaderNames.CONTENT_TYPE, TEXT_XML)%0A                             ;%0A                             return (request);%0A                         %7D%0A                     %7D,%0A                new PipelineBuilder(timeout) %7B%0A                    @Override%0A                    public ChannelPipeline setup(ChannelPipeline pipeline) %7B%0A                        // default http content processing%0A%0A                        pipeline.addLast(new DefaultContentHandler%3CInteger%3E(A.OPTION_BLOCK_SIZE) %7B%0A                            @Override%0A                            protected Integer process(String s) %7B%0A                                System.out.println(s);%0A                                return (s.length());%0A                            %7D%0A                        %7D);%0A                        return (pipeline);%0A                    %7D%0A                %7D);%0A    %7D%0A%7D%0A

add Foo demo for http post