This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Android and the fly likes Volley - no response from the URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Volley - no response from the URL" Watch "Volley - no response from the URL" New topic
Author

Volley - no response from the URL

Rama Sundar
Greenhorn

Joined: Jun 24, 2013
Posts: 2
I am unable to get any response from the URL I am hitting using the Volley library, please can you help me out ?

I am getting this on my emulator : "com.android.volley.NoConnectionError:java.io.IOexception:content length promised 45 bytes, but received 0 ."

I have pasted the code below:

RequestQueue queue = Volley.newRequestQueue(this);

String url = "http://ipchicken.com"

JsonObjectRequest jsObjRequest = new JsonObjectRequest(
Request.Method.POST, url, null,
new Response.Listener<JSONObject>() {

@Override
public void onResponse(JSONObject response) {
// TODO Auto-generated method stub
sampletext.setText("Response => " + response.toString());


}
}, new Response.ErrorListener() {

@Override
public void onErrorResponse(VolleyError error) {
// TODO Auto-generated method stub
sampletext.setText( error.toString());

}
});

queue.add(jsObjRequest);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Volley - no response from the URL
 
Similar Threads
How to add MouseLsitener to JMenu
overriding JDBCRealm
Overriding Constructor
Instance of an abstract class
How to start new activity when click on a listview and pause the process that is being in background