use of com.androidquery.callback.ProxyHandle in project androidquery by androidquery.
the class AQueryAsyncTest method testAjaxProxyStaticNTLMCredential.
public void testAjaxProxyStaticNTLMCredential() throws ClientProtocolException, IOException {
String url = "http://www.google.com";
String proxyHost = "192.168.111.20";
String domain = "AIGENSTEST.com";
String user = "user3";
String password = "Orange99";
int port = 8081;
//ProxyHandle handle = new BasicProxyHandle(host, port, user, password);
ProxyHandle handle = new NTLMProxyHandle(proxyHost, port, domain, user, password);
AjaxCallback.setProxyHandle(handle);
aq.ajax(url, String.class, new AjaxCallback<String>() {
@Override
public void callback(String url, String json, AjaxStatus status) {
done(url, json, status);
}
});
waitAsync();
assertNotNull(result);
}
use of com.androidquery.callback.ProxyHandle in project androidquery by androidquery.
the class AQueryAsyncTest method testAjaxProxyStaticBasicCredential.
public void testAjaxProxyStaticBasicCredential() throws ClientProtocolException, IOException {
String url = "http://www.google.com";
String host = "192.168.1.6";
int port = 8081;
String user = "Peter";
String password = "orange99";
//AjaxCallback.setProxy(host, port, user, password);
ProxyHandle handle = new BasicProxyHandle(host, port, user, password);
AjaxCallback.setProxyHandle(handle);
aq.ajax(url, String.class, new AjaxCallback<String>() {
@Override
public void callback(String url, String json, AjaxStatus status) {
done(url, json, status);
}
});
waitAsync();
assertNotNull(result);
}
Aggregations