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?

  Regards,


Florent,

You can create a new local context for each request and bind an instance specific CredentialsProvider to it.

This example shows how to bind a custom instance of CookieStore to the local context. You can do the same with CredentialsProvider

http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/examples/org/apache/http/examples/client/ClientCustomContext.java

Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to