Code example for BasicScheme

0
                    "muckebox"), 
                new UsernamePasswordCredentials("muckebox", password));
             
            mContext = new BasicHttpContext();
             
            BasicScheme basicAuth = new BasicScheme();
            mContext.setAttribute("preemptive-auth", basicAuth);
 
            mHttpClient.addRequestInterceptor(new PreemptiveAuth(), 0);
        } 
    } 
     
    public HttpResponse execute(HttpUriRequest request) throws ClientProtocolException, IOException {
        if (mContext != null)
            return mHttpClient.execute(request, mContext);
        else 
            return mHttpClient.execute(request);
    } 
     
    public void destroy() { 
        mHttpClient.getConnectionManager().shutdown();