Package org.eclipse.jetty.test.support.rawhttp

Examples of org.eclipse.jetty.test.support.rawhttp.HttpTesting


        request.setURI("/tests/alpha.txt");
        request.put("Host","localhost");
        request.put("Connection","close");
        // request.setContent(null);

        HttpTesting testing = new HttpTesting(new HttpSocketImpl(),serverPort);
        HttpTester.Response response = testing.request(request);

        assertEquals(HttpStatus.OK_200, response.getStatus());
        assertEquals("text/plain", response.get("Content-Type"));
        assertTrue(response.getContent().contains("ABCDEFGHIJKLMNOPQRSTUVWXYZ\n"));
    }
View Full Code Here


    }
   
    @Before
    public void setUp() throws Exception
    {
        http = new HttpTesting(getHttpClientSocket(),server.getServerPort());
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.test.support.rawhttp.HttpTesting

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.