use of javax.ws.rs.client.WebTarget in project jersey by jersey.
the class SingletonDependentBeanTest method testGet.
@Test
public void testGet() {
final WebTarget singleton = target().path("jcdibean/dependent/singleton").path(p).queryParam("x", x);
String s = singleton.request().get(String.class);
assertThat(s, containsString(singleton.getUri().toString()));
assertThat(s, containsString(String.format("p=%s", p)));
assertThat(s, containsString(String.format("queryParam=%s", x)));
}
use of javax.ws.rs.client.WebTarget in project jersey by jersey.
the class FollowRedirectsTest method testDontFollow.
@Test
public void testDontFollow() {
WebTarget t = target("test/redirect");
assertEquals(303, t.request().get().getStatus());
}
use of javax.ws.rs.client.WebTarget in project jersey by jersey.
the class NoEntityTest method testGetWithClose.
@Test
public void testGetWithClose() {
WebTarget r = target("test");
for (int i = 0; i < 5; i++) {
Response cr = r.request().get();
cr.close();
}
}
use of javax.ws.rs.client.WebTarget in project jersey by jersey.
the class NoEntityTest method testPostWithClose.
@Test
public void testPostWithClose() {
WebTarget r = target("test");
for (int i = 0; i < 5; i++) {
Response cr = r.request().post(null);
cr.close();
}
}
use of javax.ws.rs.client.WebTarget in project jersey by jersey.
the class NoEntityTest method testGet.
@Test
public void testGet() {
WebTarget r = target("test");
for (int i = 0; i < 5; i++) {
Response cr = r.request().get();
cr.close();
}
}
Aggregations