List of usage examples for javax.servlet.http HttpServletResponse SC_PAYMENT_REQUIRED
int SC_PAYMENT_REQUIRED
To view the source code for javax.servlet.http HttpServletResponse SC_PAYMENT_REQUIRED.
Click Source Link
From source file:io.airlift.http.server.TestHttpServerProvider.java
@Test public void testFilter() throws Exception { createServer();/*ww w . ja va2 s . c o m*/ server.start(); try (JettyHttpClient client = new JettyHttpClient()) { StatusResponse response = client.execute( prepareGet().setUri(httpServerInfo.getHttpUri().resolve("/filter")).build(), createStatusResponseHandler()); assertEquals(response.getStatusCode(), HttpServletResponse.SC_PAYMENT_REQUIRED); assertEquals(response.getStatusMessage(), "filtered"); } }
From source file:com.proofpoint.http.server.TestHttpServerProvider.java
@Test public void testFilter() throws Exception { createServer();/*from www. j a va 2 s.co m*/ server.start(); HttpClient client = new ApacheHttpClient(); StatusResponse response = client.execute( prepareGet().setUri(httpServerInfo.getHttpUri().resolve("/filter")).build(), createStatusResponseHandler()); assertEquals(response.getStatusCode(), HttpServletResponse.SC_PAYMENT_REQUIRED); assertEquals(response.getStatusMessage(), "filtered"); }