use of com.bluenimble.platform.http.response.HttpResponse in project serverless by bluenimble.
the class UseProxyRequest method main.
public static void main(String[] args) throws Exception {
DefaultHttpClient client = new DefaultHttpClient();
GetRequest request = new GetRequest(HttpUtils.createEndpoint(new URI("http://amazon.com/Apple-Retina-display-MD510LL-9-7-Inch/dp/B009W8YQ6K/ref=sr_1_1?s=pc&ie=UTF8&qid=1414360465&sr=1-1&keywords=ipad")));
request.setProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("us-il.proxymesh.com", 31280)));
HttpResponse response = null;
for (int i = 0; i < 50; i++) {
response = client.send(request);
System.out.println(response.getStatus());
}
}
Aggregations