Code example for URI

Methods: getHost

0
    } 
 
    public AsyncHttpRequest(URI uri, String method) {
        Assert.assertNotNull(uri);
        mMethod = method;
        mHeaders = new RequestHeaders(uri, mRawHeaders);
        mRawHeaders.setStatusLine(getRequestLine().toString());
        mHeaders.setHost(uri.getHost());
        mHeaders.setUserAgent(getDefaultUserAgent());
        mHeaders.setAcceptEncoding("gzip, deflate");
        mHeaders.getHeaders().set("Connection", "keep-alive");
        mHeaders.getHeaders().set("Accept", "*/*");
    } 
 
    public URI getUri() {
        return mHeaders.getUri();
    } 
     
    private RawHeaders mRawHeaders = new RawHeaders();
    private RequestHeaders mHeaders;
    private Handler mHandler = Looper.myLooper() == null ? null : new Handler();