Examples of SimpleResponse


Examples of org.apache.commons.httpclient.server.SimpleResponse

                    final SimpleRequest request) throws IOException {

                // Make sure the request if fully consumed
                request.getBodyBytes();
               
                SimpleResponse response = new SimpleResponse();
                response.setStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK);
                response.setBodyString("stuff back");

                conn.setKeepAlive(true);
                conn.writeResponse(response);
               
                return true;
View Full Code Here

Examples of org.elasticsearch.hadoop.rest.SimpleResponse

            Socket sk = ReflectionUtils.invoke(GET_SOCKET, conn, (Object[]) null);
            String addr = sk.getLocalAddress().getHostAddress();
            log.trace(String.format("Rx %s@[%s] [%s-%s] [%s]", proxyInfo, addr, http.getStatusCode(), HttpStatus.getStatusText(http.getStatusCode()), http.getResponseBodyAsString()));
        }

        return new SimpleResponse(http.getStatusCode(), new ResponseInputStream(http), request.uri());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.