use of com.atlassian.httpclient.api.Response in project jira-plugin by jenkinsci.
the class ApacheAsyncHttpClientTest method simple_get.
@Test
public void simple_get() throws Exception {
TestHandler testHandler = new TestHandler();
prepare(testHandler);
ApacheAsyncHttpClient httpClient = new ApacheAsyncHttpClient(null, buildApplicationProperties(), new NoOpThreadLocalContextManager(), new HttpClientOptions());
Response response = //
httpClient.newRequest("http://localhost:" + connector.getLocalPort() + "/foo").get().get(10, TimeUnit.SECONDS);
Assert.assertEquals(200, response.getStatusCode());
Assert.assertEquals(CONTENT_RESPONSE, IOUtils.toString(response.getEntityStream()));
}
Aggregations