use of org.folio.rest.support.Response in project mod-inventory-storage by folio-org.
the class MaterialTypesClient method create.
public String create(String name) throws InterruptedException, ExecutionException, TimeoutException {
CompletableFuture<Response> completed = new CompletableFuture<>();
JsonObject materialTypeRequest = new JsonObject().put("name", name);
client.post(materialTypesUrl, materialTypeRequest, StorageTestSuite.TENANT_ID, ResponseHandler.json(completed));
Response response = completed.get(5, TimeUnit.SECONDS);
return response.getJson().getString("id");
}
Aggregations