title: How do I call Web Service written in Python from Android app
body: <p><a href="http://pastebin.com/PVgqm4R1" rel="nofollow">Here is my web service code</a> </p>
  
  <p>I can call it in my browser using <code>http://sheltered-taiga-3258.herokuapp.com/toi/&lt;input parameters&gt;</code> I am collecting Input parameters from user on android device. Obviously web service returns a JSON data which I need to display at client side in android application. I went through many posts and tutorials on android and web service but was not successful as many have the web service example of POST request and service in PHP. I want to do it for GET and service is in flask. </p>
  
  <p>Please help Thank you.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I am calling web service using HttpGet object and I am passing my URL as parameter to it.</p>
  
  <pre><code>HttpGet httpget = new HttpGet(myURL);
  </code></pre>
  
  <p>and I am Constructing myURL as</p>
  
  <pre><code>EditText inputString = (EditText) findViewById(R.id.serverText);
  String appendString =URLEncoder.encode(inputString.getText().toString(), "UTF-8") ;
  private final HttpClient Client = new DefaultHttpClient();
  String myURL = "http://sheltered-taiga-3258.herokuapp.com/toi/" + appendString;
  </code></pre>
  
  <p>Here I am getting myURL as
  <em><a href="http://sheltered-taiga-3258.herokuapp.com/toi/hc+stays+toll+collection" rel="nofollow">http://sheltered-taiga-3258.herokuapp.com/toi/hc+stays+toll+collection</a></em> but I want it in this manner</p>
  
  <p><em><a href="http://sheltered-taiga-3258.herokuapp.com/toi/HC%20stays%20toll%20collection%20in%20kolhapur%20city" rel="nofollow">http://sheltered-taiga-3258.herokuapp.com/toi/HC%20stays%20toll%20collection%20in%20kolhapur%20city</a></em></p>
  
  <p>I know there is some url encoding problem but dont know way out of it.</p>