Code example for HttpResponse

Methods: setEntity

0
            public void handle( 
                    HttpRequest request,
                    HttpResponse response,
                    HttpContext context) throws HttpException, IOException {
                 String uri = request.getRequestLine().getUri();
                 response.setEntity(new StringEntity(uri));
            } 
        }); 
 
        mServer.start();
        mServerUrl = "http://localhost:" + mServer.getPort() + "/";
    } 
 
    protected void tearDown() throws Exception { 
        if (mServer != null) mServer.shutdown();
    } 
 
    @LargeTest 
    public void testThreadCheck() throws Exception { 
        ContentResolver resolver = getContext().getContentResolver();
        GoogleHttpClient client = new GoogleHttpClient(resolver, "Test",