Code example for BasicHttpContext

0
            } else if (reader.isPost()) {
                method = initPost(reader);
            } else { 
                logAndThrow("Method " + reader.getMethod() + " is not implemented yet");
            } 
            HttpContext context = new BasicHttpContext();
 
            actor.onPreprocess(method, context);
 
            final HttpResponse httpResponse = client.execute(method, context);
            actor.onPostprocess(httpResponse, context);
 
            actor.onHeaderReceived(httpResponse);
            checkResponse(actor, httpResponse);
 
            if (httpResponse == null) {
                logAndThrow("Response from " + reader.getUri() + " is null");
            } 
            if (verboseLoggingEnabled()) { 
                v("Request finished"); 
            }