blob: ad26582a0facc2d35a2cbd3bac830ae2cdda16b9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package com.juick.server.configuration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
@Configuration
public class ActivityPubClientConfig {
@Bean
public RestTemplate apClient() {
SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
requestFactory.setOutputStreaming(false);
RestTemplate restTemplate = new RestTemplate(requestFactory);
restTemplate.setErrorHandler(new ActivityPubClientErrorHandler());
return restTemplate;
}
}
|