android - How to get JSON from server without send JSON request -


i need help. use volley sending json object rest api server. , data api app (json). work fine:

jsonobjectrequest mjsonobjectrequest = new jsonobjectrequest(request.method.post, url, jsondata, jsonlistener, errorlistener) ...

and want send request without jsondata (i can't set null). global values. there not necessary send data. , dunno how send request. can me?

till understand ur problem answer this

stringrequest distrequest=new stringrequest(request.method.post, your_url, new response.listener<string>() {              @override             public void onresponse(string response) {        toast.maketext(mainactivity.this, " "+response.tostring, toast.length_short).show();                         }         }, new response.errorlistener() {             @override            public void onerrorresponse(volleyerror error) {                progressdialog.dismiss();                 toast.maketext(mainactivity.this, " "+error.tostring, toast.length_short).show();              }         });         requestqueue distqueue=volley.newrequestqueue(this);          distqueue.add(distrequest);     } 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -