Code example for HttpContext

Methods: getAttribute

        returnValues.put("content", result.toString());
        return returnValues;
    private static String extractUriFromHttpContext(HttpContext localContext) {
        String newHost = ((HttpHost) localContext.getAttribute(ExecutionContext.HTTP_TARGET_HOST)).toURI();
        String path = ((HttpRequest) localContext.getAttribute(ExecutionContext.HTTP_REQUEST)).getRequestLine()
        String newUri = newHost + path;
        return newUri;
class U2 { 
    static CharSequence readInputStreamIntoString(InputStream is, String charsetName, long started, Job job)
            throws IOException, DownloadCancelledException, DownloadTimedOutException { 
        // LATER throw an Exception when the buffer get's to big 
        // Matcher m = WebPageDownloadDirector.PATTERN_CHARSET.matcher(result);