Package ch.mimo.netty.handler.codec.icap

Examples of ch.mimo.netty.handler.codec.icap.IcapRequest


              bootstrap.releaseExternalResources();
              return;
          }

          // Prepare the ICAP request.
          IcapRequest request = new DefaultIcapRequest(IcapVersion.ICAP_1_0,IcapMethod.REQMOD,"/simple","localhost");    
          HttpRequest httpRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST,"/some/servers/uri");
          httpRequest.setHeader(HttpHeaders.Names.HOST,host);
          httpRequest.setHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.CLOSE);
          httpRequest.setHeader(HttpHeaders.Names.ACCEPT_ENCODING, HttpHeaders.Values.GZIP);
          httpRequest.setContent(ChannelBuffers.wrappedBuffer("This is the message body that contains all the necessary data to answer the ultimate question...".getBytes()));
          request.setHttpRequest(httpRequest);
         
          // Send the ICAP request.
          channel.write(request);

          // Wait for the server to close the connection.
View Full Code Here

TOP

Related Classes of ch.mimo.netty.handler.codec.icap.IcapRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.