Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.devbliss.doctest.httpfactory;
 
 import static com.devbliss.doctest.httpfactory.HttpConstants.HANDLE_REDIRECTS;
 
 import java.net.URI;
 
Implements a GET HTTP request which does not handle any redirect.

Author(s):
bmary
public class GetWithoutRedirectImpl implements GetFactory {
    public HttpGet createGetRequest(URI urithrows IOException {
        HttpGet httpGet = new HttpGet(uri);
        HttpParams params = new BasicHttpParams();
        params.setParameter(false);
        httpGet.setParams(params);
        return httpGet;
    }
New to GrepCode? Check out our FAQ X