org.springframework.social.support.ClientHttpRequestFactorySelector Java Examples
The following examples show how to use
org.springframework.social.support.ClientHttpRequestFactorySelector.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Yahoo2Template.java From cloudstreetmarket.com with GNU General Public License v3.0 | 5 votes |
private void initialize(String clientId, String accessToken, String guid) { // Wrap the request factory with a BufferingClientHttpRequestFactory so // that the error handler can do repeat reads on the response.getBody() super.setRequestFactory(ClientHttpRequestFactorySelector .bufferRequests(getRestTemplate().getRequestFactory())); initSubApis(clientId, accessToken, guid); }
Example #2
Source File: PlusImpl.java From google-plus-java-api with Apache License 2.0 | 5 votes |
public PlusImpl(String accessToken, GooglePlusConfiguration config, OAuth2RefreshCallback refreshCallback) { super(accessToken); // (doing work in constructor because the superclass does it that forces us to do it) configure(config); // Wrap the request factory with a BufferingClientHttpRequestFactory so // that the error handler can do repeat reads on the response.getBody() ClientHttpRequestFactory requestFactory = ClientHttpRequestFactorySelector .bufferRequests(getRestTemplate().getRequestFactory()); requestFactory = new TokenRefreshingClientHttpRequestFactory(requestFactory, refreshCallback, getRestTemplate().getInterceptors()); getRestTemplate().setRequestFactory(requestFactory); }
Example #3
Source File: WechatImpl.java From spring-social-wechat with Apache License 2.0 | 4 votes |
@Override public void setRequestFactory(ClientHttpRequestFactory requestFactory) { super.setRequestFactory(ClientHttpRequestFactorySelector.bufferRequests(requestFactory)); }