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

Examples of org.eclipse.jetty.test.support.rawhttp.HttpTesting.request()


        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

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.