Bouncing between "Adapter is detached" and "No wrapped connection" with
HttpClient
So as i said i'm bouncing back and forth between these two errors when
trying to run HttpClient.execute(HttpPost). Getting IllegalStateException
public class NetMethods {
private static HttpClient client = new DefaultHttpClient();
public static void getStuff() {
ArrayList<Alarm> alarms = new ArrayList<Alarm>();
HttpPost post = HttpPostFactory.getHttpPost("GetStuff");
StringBuilder builder = new StringBuilder();
HttpResponse response = client.execute(post); // Exception thrown here
...
Also, my MttpPostFactory just has this
import org.apache.http.client.methods.HttpPost;
public class HttpPostFactory {
private static final String url = "http://example.com/ExampleFolder/";
public static HttpPost getHttpPost(String s) {
return new HttpPost(url + s);
}
}
Thursday, August 22, 2013
Bouncing between "Adapter is detached" and "No wrapped connection" with HttpClient
Posted on 9:46 PM by Unknown
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment