title: Volley - no response from the URL
body: <p>I am unable to get any response from the URL I am hitting using the Volley library, please can you help me out ?</p>
  
  <p>I am getting this on my emulator 
  : "com.android.volley.NoConnectionError:java.io.IOexception:content length promised 45 bytes, but received 0 ."</p>
  
  <p>I have pasted the code below:</p>
  
  <p>String url = "<a href="http://ipchicken.com" rel="nofollow">http://ipchicken.com</a>" </p>
  
  <pre><code>    JsonObjectRequest jsObjRequest = new JsonObjectRequest(
              Request.Method.POST, url, null,
              new Response.Listener&lt;JSONObject&gt;() {
  
                  @Override
                  public void onResponse(JSONObject response) {
                      // TODO Auto-generated method stub
                      sampletext.setText("Response =&gt; " + response.toString());
  
  
                  }
              }, new Response.ErrorListener() {
  
                  @Override
                  public void onErrorResponse(VolleyError error) {
                      // TODO Auto-generated method stub
                      sampletext.setText( error.toString());
  
                  }
              });
  
      queue.add(jsObjRequest);
  </code></pre>