aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-03-15 11:27:08 +0300
committerGravatar Vitaly Takmazov2019-03-15 11:27:08 +0300
commit861580c3dae53fb8e57956fd44aafa79f5d2c145 (patch)
tree7118945e42fe2989c23527adbc74282c9958090a
parent294805a039dfd38646a47e11acba0d9dbb6c107f (diff)
trying to remove okHttp
-rw-r--r--build.gradle3
-rw-r--r--src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java3
2 files changed, 2 insertions, 4 deletions
diff --git a/build.gradle b/build.gradle
index a5dded2c..acaaf0f2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -160,7 +160,7 @@ dependencies {
runtime 'org.mariadb.jdbc:mariadb-java-client:2.3.0'
runtime 'net.java.dev.jna:jna:5.2.0'
runtime 'net.java.dev.jna:jna-platform:5.2.0'
- runtime 'com.h2database:h2:1.4.198'
+ runtime 'com.h2database:h2:1.4.199'
runtime "commons-fileupload:commons-fileupload:1.4"
compile 'com.github.ooxi:serialized-php-parser:0.5.0'
@@ -168,7 +168,6 @@ dependencies {
compile 'com.atlassian.commonmark:commonmark:0.12.1'
compile 'com.atlassian.commonmark:commonmark-ext-autolink:0.12.1'
compile 'org.tomitribe:tomitribe-http-signatures:1.1'
- compile 'com.squareup.okhttp3:okhttp:3.11.0'
compile 'com.google.api-client:google-api-client:1.28.0'
compile "com.kotcrab.remark:remark:1.0.0"
diff --git a/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java b/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java
index 6cb1126d..d7d49355 100644
--- a/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java
+++ b/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java
@@ -4,7 +4,6 @@ import com.juick.server.api.activity.model.Activity;
import com.juick.server.helpers.HeaderRequestInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.http.client.OkHttp3ClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
import javax.inject.Inject;
@@ -16,7 +15,7 @@ public class ActivityPubClientConfig {
ActivityPubClientErrorHandler activityPubClientErrorHandler;
@Bean
public RestTemplate apClient() {
- RestTemplate restTemplate = new RestTemplate(new OkHttp3ClientHttpRequestFactory());
+ RestTemplate restTemplate = new RestTemplate();
restTemplate.setErrorHandler(activityPubClientErrorHandler);
restTemplate.setInterceptors(Collections.singletonList(
new HeaderRequestInterceptor("Accept", Activity.ACTIVITY_MEDIA_TYPE)));