Android: IllegalStateException in HttpGet

前端 未结 4 1635
甜味超标
甜味超标 2020-12-02 02:58

I\'m trying to send a GET request using HttpClient, but I keep getting an IllegalStateException. Any idea what\'s causing this? I\'ve

4条回答
  •  忘掉有多难
    2020-12-02 03:32

    When you do this:

    HttpGet getData = new HttpGet(this.address);
    

    what exactly is this.address? I'm assuming it is a String, if so it needs to look like this:

    String address = "http://www.google.com/path/to/document";
    

    You've probably done this:

    String address = "google.com";
    

提交回复
热议问题