org.apache.commons.httpclient.params.DefaultHttpParams Java Examples
The following examples show how to use
org.apache.commons.httpclient.params.DefaultHttpParams.
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: Http3Util.java From httpsig-java with The Unlicense | 6 votes |
public static void enableAuth(HttpClient client, Keychain keychain, KeyId keyId) { Signer signer = new Signer(keychain, keyId); CredentialsProvider credProvider = (CredentialsProvider) client.getParams() .getParameter(CredentialsProvider.PROVIDER); CredentialsProvider newProvider; if (credProvider instanceof SignerCredentialsProvider) { newProvider = new SignerCredentialsProvider(signer, ((SignerCredentialsProvider) credProvider).getDelegatee()); } else { newProvider = new SignerCredentialsProvider(signer, credProvider); } client.getParams().setParameter(CredentialsProvider.PROVIDER, newProvider); AuthPolicy.registerAuthScheme(Constants.SCHEME, Http3SignatureAuthScheme.class); List<String> schemes = new ArrayList<String>(); schemes.add(Constants.SCHEME); Collection authSchemePriority = (Collection) DefaultHttpParams.getDefaultParams().getParameter(AuthPolicy.AUTH_SCHEME_PRIORITY); if (authSchemePriority != null) { schemes.addAll(authSchemePriority); } client.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, schemes); }
Example #2
Source File: HttpClientFactory.java From alfresco-core with GNU Lesser General Public License v3.0 | 5 votes |
public void init() { this.sslKeyStore = new AlfrescoKeyStoreImpl(sslEncryptionParameters.getKeyStoreParameters(), keyResourceLoader); this.sslTrustStore = new AlfrescoKeyStoreImpl(sslEncryptionParameters.getTrustStoreParameters(), keyResourceLoader); this.sslSocketFactory = new AuthSSLProtocolSocketFactory(sslKeyStore, sslTrustStore, keyResourceLoader); // Setup the Apache httpclient library to use our concurrent HttpParams factory DefaultHttpParams.setHttpParamsFactory(new NonBlockingHttpParamsFactory()); }
Example #3
Source File: StockTickInput.java From attic-apex-malhar with Apache License 2.0 | 5 votes |
@Override public void setup(OperatorContext context) { url = prepareURL(); client = new HttpClient(); method = new GetMethod(url); DefaultHttpParams.getDefaultParams().setParameter("http.protocol.cookie-policy", CookiePolicy.BROWSER_COMPATIBILITY); }
Example #4
Source File: YahooFinanceCSVInputOperator.java From attic-apex-malhar with Apache License 2.0 | 5 votes |
@Override public void setup(OperatorContext context) { url = prepareURL(); client = new HttpClient(); method = new GetMethod(url); DefaultHttpParams.getDefaultParams().setParameter("http.protocol.cookie-policy", CookiePolicy.BROWSER_COMPATIBILITY); }
Example #5
Source File: CrawlerTest.java From JPPF with Apache License 2.0 | 4 votes |
/** * Initializations. */ private static void init() { DefaultHttpParams.setHttpParamsFactory(new JPPFHttpDefaultParamsFactory()); }
Example #6
Source File: SOLRAPIClientFactory.java From SearchServices with GNU Lesser General Public License v3.0 | 4 votes |
@Override public void init() { DefaultHttpParams.setHttpParamsFactory(new NonBlockingHttpParamsFactory()); }