Code example for ResponseServer

0
                .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "HttpComponents/1.1");
 
            // Set up the HTTP protocol processor 
            BasicHttpProcessor httpproc = new BasicHttpProcessor();
            httpproc.addInterceptor(new ResponseDate());
            httpproc.addInterceptor(new ResponseServer());
            httpproc.addInterceptor(new ResponseContent());
            httpproc.addInterceptor(new ResponseConnControl());
             
            // Set up the HTTP service 
            new HttpService(httpproc, new DefaultConnectionReuseStrategy(),
                    new DefaultHttpResponseFactory());
        } 
         
        public void stopServer() { 
            try { 
                this.serversocket.close();
            } catch (IOException e) {
                e.printStackTrace();
            } 
Contextual code suggestions in your IDE  Get Codota for Java