Oleg Kalnichevski wrote: > Florent Georges wrote: Hi,
> > I use client.getCredentialsProvider() to set credentials > > for Basic or Digest authentication. So for now, the scope of > > the credential settings are the Http Client. But I would > > like they have the scope of one single request instead. Is > > it possible? > You can create a new local context for each request and bind an > instance specific CredentialsProvider to it. Thanks for the answer. Actually, in between, I used the other way around. The credentials must be set for one single request, and cookies must survive among several requests, so I create one CookieStore and instantiate a new HTTP client for each request (each one bound to the same cookie store.) Is there a big difference between this approach and what you suggested (if I am right, using the same client but a different context for each request) ? Are there any other info that would be shared using the same client? What I like in my approach is that I control exactly what is shared between every requests, instead of declaring what shouldn't be shared... Regards, -- Florent Georges http://www.fgeorges.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
