forked from D-Net/dnet-hadoop
changed deprecated method with non deprecated versioen
This commit is contained in:
parent
14bf2e7238
commit
10d8bbada8
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue