use of org.apache.jena.atlas.web.TypedInputStream in project jena by apache.
the class TestFusekiTestAuth method testServer_auth.
@Test
public void testServer_auth() {
BasicCredentialsProvider credsProvider = new BasicCredentialsProvider();
Credentials credentials = new UsernamePasswordCredentials(USER, PASSWORD);
credsProvider.setCredentials(AuthScope.ANY, credentials);
HttpClient client = HttpClients.custom().setDefaultCredentialsProvider(credsProvider).build();
try (TypedInputStream in = HttpOp.execHttpGet(FusekiTestAuth.urlDataset(), "*/*", client, null)) {
}
}
use of org.apache.jena.atlas.web.TypedInputStream in project jena by apache.
the class TestAdmin method list_datasets_2.
@Test
public void list_datasets_2() {
try (TypedInputStream in = execHttpGet(ServerCtl.urlRoot() + "$/" + opDatasets)) {
assertEqualsIgnoreCase(WebContent.contentTypeJSON, in.getContentType());
JsonValue v = JSON.parseAny(in);
assertNotNull(v.getAsObject().get("datasets"));
checkJsonDatasetsAll(v);
}
}
Aggregations