Commit 821144c8 authored by j.hoerdt's avatar j.hoerdt
Browse files

remove dead code

parent af5fdabd
......@@ -36,30 +36,6 @@ public class Handle {
private static HostnameVerifier allowAllHostNames() {
return (hostname, sslSession) -> true;
}
public static void main(String[] args) throws Exception {
Request request = new Request.Builder()
.url("https://vm13.pid.gwdg.de:8000/api/handles?prefix=21.11138")
.post(RequestBody.create(null, new byte[0]))
.header("Accept", "application/json")
.header("Authorization", "Handle clientCert=\"true\"")
.build();
try (Response response = http_client.newCall(request).execute()) {
System.out.println(response.body().string() + response.code());
}
// var challenge = client.send(challenge_request, BodyHandlers.ofString());
// System.out.println(challenge.body() + challenge.statusCode());
// if (challenge.statusCode() != 201) {
// throw new Exception("server send status code " + challenge.statusCode() + " instead of 201");
// }
// new Gson().fromJson(response_body, JsonObject.class).get("epic-pid").getAsString();
}
public static OkHttpClient get_client() throws Exception, NoSuchAlgorithmException, KeyManagementException {
var trust_managers = get_trust_managers();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment