Code example for BasicHttpContext

0
                checkMultipartParams((HttpPut) method, request);
            } else { 
                logAndThrow("Method " + request.getMethod() + " is not implemented yet");
            } 
            method.setParams(params);
            HttpContext context = new BasicHttpContext();
            eventBus.fireOnPreProcess(request, method, context);
            final HttpResponse httpResponse = client.execute(method, context);
            eventBus.fireOnPostProcess(request, httpResponse, context);
            if (httpResponse == null) {
                logAndThrow("Response from " + request.getUri() + " is null");
            } 
            response.setHttpResponse(httpResponse);
            response.setIntentWrapper(request);
            if (verboseLoggingEnabled()) { 
                v("Request returning response"); 
            } 
            return response;
        } catch (Throwable t) {
            t.printStackTrace();
Connect your IDE to all the code out there  Get Codota for Java