aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/configuration
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-07-01 16:52:45 +0300
committerGravatar Vitaly Takmazov2019-07-01 16:52:45 +0300
commitfb91981f06bf069ac3034135ebcbd67036675d97 (patch)
tree8b6a2250dad4b3ca6fc1236d0dedf8aa35453ea8 /src/main/java/com/juick/server/configuration
parentbd3f12cccc90ec81c9c6de85de700e5286007fda (diff)
Use Apache HTTP Client for ActivityPub
Diffstat (limited to 'src/main/java/com/juick/server/configuration')
-rw-r--r--src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java b/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java
index 65bfeade..1cf676cd 100644
--- a/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java
+++ b/src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java
@@ -5,6 +5,7 @@ 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.HttpComponentsClientHttpRequestFactory;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.client.RestTemplate;
@@ -26,6 +27,7 @@ public class ActivityPubClientConfig {
@Bean
public RestTemplate apClient() {
RestTemplate restTemplate = new RestTemplate();
+ restTemplate.setRequestFactory(new HttpComponentsClientHttpRequestFactory());
restTemplate.getMessageConverters().add(0, mappingJacksonHttpMessageConverter());
restTemplate.setErrorHandler(activityPubClientErrorHandler);
restTemplate.setInterceptors(Collections.singletonList(