changed deprecated method with non deprecated versioen

This commit is contained in:
Miriam Baglioni 2020-10-30 14:10:10 +01:00
parent 14bf2e7238
commit 10d8bbada8
1 changed files with 12 additions and 11 deletions

View File

@ -59,7 +59,6 @@ public class ZenodoAPIClient implements Serializable {
String json = "{}";
OkHttpClient httpClient = new OkHttpClient.Builder().connectTimeout(600, TimeUnit.SECONDS).build();
// RequestBody body = RequestBody.create(MEDIA_TYPE_JSON, json);
RequestBody body = RequestBody.create(json, MEDIA_TYPE_JSON);
@ -101,7 +100,8 @@ public class ZenodoAPIClient implements Serializable {
OkHttpClient httpClient = new OkHttpClient.Builder()
.writeTimeout(600, TimeUnit.SECONDS)
.readTimeout(600, TimeUnit.SECONDS)
.connectTimeout(600, TimeUnit.SECONDS).build();
.connectTimeout(600, TimeUnit.SECONDS)
.build();
Request request = new Request.Builder()
.url(bucket + "/" + file_name)
@ -285,7 +285,8 @@ public class ZenodoAPIClient implements Serializable {
private String getBucket(String url) throws IOException {
OkHttpClient httpClient = new OkHttpClient.Builder()
.connectTimeout(600, TimeUnit.SECONDS).build();
.connectTimeout(600, TimeUnit.SECONDS)
.build();
Request request = new Request.Builder()
.url(url)