How to send Json POST request using Volley in android in the Given Tutorial? -


hi beginner in android , learning make api calls. got tutorial of volley uses receive response. want send post request using volley. don't know how that, code post in given tutorial. please guide me send post request.the link tutorial learning http://www.truiton.com/2015/02/android-volley-example/

you have used below code send request

// instantiate requestqueue. requestqueue queue = volley.newrequestqueue(this); string url ="http://www.google.com";  // request string response provided url. stringrequest stringrequest = new stringrequest(request.method.post, url,             new response.listener<string>() {     @override     public void onresponse(string response) {         // display first 500 characters of response string.         mtextview.settext("response is: "+ response.substring(0,500));     } }, new response.errorlistener() {     @override     public void onerrorresponse(volleyerror error) {         mtextview.settext("that didn't work!");     } }); // add request requestqueue. queue.add(stringrequest); 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -