use of com.adobe.acs.commons.http.JsonObjectResponseHandler in project acs-aem-commons by Adobe-Consulting-Services.
the class HttpClientFactoryImplTest method testJsonGet.
@Test
public void testJsonGet() throws Exception {
impl.activate(config);
Request get = impl.get("/anonJson");
Executor exec = impl.getExecutor();
JSONObject jsonObject = exec.execute(get).handleResponse(new JsonObjectResponseHandler());
assertThat(jsonObject.has("foo"), is(true));
assertThat(jsonObject.getString("foo"), is("bar"));
}
Aggregations