Java Code Examples for org.springframework.http.client.ClientHttpRequestFactory

Following code examples demonstrate how to use org.springframework.http.client.ClientHttpRequestFactory from spring-framework. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use org.springframework.http.client.ClientHttpRequestFactory and various code implementation of this class.
Example 1
Project : spring-framework Source File : UriPrefixingClientHttpRequestFactory.java View Source Code on GitHub

    
    public UriPrefixingClientHttpRequestFactory(final ClientHttpRequestFactory factory,
                                                final String protocol,
                                                final String hostname,
                                                final int port) {
        this(factory, UriComponentsBuilder.newInstance().scheme(protocol).host(hostname).port(port).build().toUri());
    }
			
Example 2
Project : spring-framework Source File : HTTPConfiguration.java View Source Code on GitHub

	private ClientHttpRequestFactory clientHttpRequestFactory() {
		final HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory();
		factory.setReadTimeout(15000);
		factory.setConnectTimeout(15000);

		return factory;
	}