Search in sources :

Example 1 with BasicHttpContext

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;
}
Also used : BasicHttpContext(org.opendatakit.httpclientandroidlib.protocol.BasicHttpContext) BasicHttpContext(org.opendatakit.httpclientandroidlib.protocol.BasicHttpContext) HttpContext(org.opendatakit.httpclientandroidlib.protocol.HttpContext)

Aggregations

BasicHttpContext (org.opendatakit.httpclientandroidlib.protocol.BasicHttpContext)1 HttpContext (org.opendatakit.httpclientandroidlib.protocol.HttpContext)1