Search in sources :

Example 1 with HttpClientInterface

use of org.folio.rest.tools.client.interfaces.HttpClientInterface in project raml-module-builder by folio-org.

the class HTTPMockTest method test.

@Test
public void test() {
    HttpClientInterface client = HttpClientFactory.getHttpClient("localhost", 8080, "zxc");
    try {
        CompletableFuture<Response> cf = client.request("auth_test2");
        System.out.println("-------------------------------------->" + cf.get().getBody());
        assertEquals("1", cf.get().getBody().getString("id"));
    } catch (Exception e) {
        assertTrue(false);
        e.printStackTrace();
    }
}
Also used : Response(org.folio.rest.tools.client.Response) HttpClientInterface(org.folio.rest.tools.client.interfaces.HttpClientInterface) Test(org.junit.Test)

Aggregations

Response (org.folio.rest.tools.client.Response)1 HttpClientInterface (org.folio.rest.tools.client.interfaces.HttpClientInterface)1 Test (org.junit.Test)1