diff options
Diffstat (limited to 'src/main/java/com/juick/server')
-rw-r--r-- | src/main/java/com/juick/server/configuration/ActivityPubClientConfig.java | 2 |
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 65bfeade1..1cf676cdc 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( |