use of org.opendatakit.httpclientandroidlib.protocol.BasicHttpContext in project collect by opendatakit.
the class Collect method getHttpContext.
/**
* Construct and return a session context with shared cookieStore and credsProvider so a user
* does not have to re-enter login information.
*/
public synchronized HttpContext getHttpContext() {
// context holds authentication state machine, so it cannot be
// shared across independent activities.
HttpContext localContext = new BasicHttpContext();
localContext.setAttribute(HttpClientContext.COOKIE_STORE, cookieStore);
localContext.setAttribute(HttpClientContext.CREDS_PROVIDER, credsProvider);
return localContext;
}
Aggregations