i unable response url hitting using volley library, please can me out ?
i getting on emulator : "com.android.volley.noconnectionerror:java.io.ioexception:content length promised 45 bytes, received 0 ."
i have pasted code below:
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);
if constructed requestqueue
hand, instead of calling volley.newrequestqueue
, need call .start()
on it. otherwise looks fine. thanks
Comments
Post a Comment